|
An easy way of doing this is with an array a bit of manipulation as the following example shows: D EmpDat s 4p 0 D Months ds D MthTxt 36a Inz('JanFebMarAprMayJunJulAugSep- D OctNovDec') D MthArr 3a Dim(12) Overlay(MthTxt) D ds D DDMM 4 0 D DD 2 0 Overlay(DDMM:1) D MM 2 0 Overlay(DDMM:3) D FmtDat s 8a C Eval EmpDat = 2710 C Eval DDMM = EmpDat C Eval FmtDat = %EditC(DD:'Z') + ' - ' + C MthArr(MM) C FmtDat Dsply C Eval *InLr = *On C Return Hope it helps Jonathan -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of sunny singh Sent: 16 April 2006 13:32 To: MIDRANGE-L@xxxxxxxxxxxx Subject: prob - storing date in rpg /400 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.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.