|
hdftactgrp(*no) actgrp(*caller) bnddir('QC2LE')
dbirthdate s 4p 0 inz(410)
doutDate s 6a
doutDays s 10i 0
ddateToLillian pr 8f extproc('CEEDAYS') opdesc
d inDate 6a const
d pictureString 6a const
d outLillian 10i 0
d fc 12a options(*omit)
dLillianToChar pr 8f extproc('CEEDATE') opdesc
d inLillian 10i 0 const
d pictureString 6a const
d outDate 6a
d fc 12a options(*omit)
/free
dateToLillian(%trim(%editw(birthdate : '0 ') + '04') :
'DDMMYY' :
outDays :
*omit);
LillianToChar(outDays :
'DD-Mmm' :
outDate :
*omit);
*inlr = *on;
/end-free
Run it in debug and see what outDate is after the call to LillianToChar.
This is specific to your situation - a more generic version would be
useful - I think Scott Klement has done some articles on this.
HTH Vern At 07:32 AM 4/16/2006, you wrote:
RPG/400---> i have a physical file... field (suppose date of birth) EMPDAT 4P 0 TEXT('EMPLOYEE DATE OD BIRTH')(length 4 packed with zero decimal places )EMPNME 20A TEXT('EMPLOYEE NAME') date(EMPDAT) should be stored as DD-MM the data base file but when it is displayed on the screen (say screen1). it should be displayed as DD -MMM(e.g. 27 - oct)''please tell me how to do this.. thank you ..... :)) --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.