The following are D spec examples from an RPGLE program
* General purpose date data type
D aDateType S D DATFMT(*ISO) yyyy-mm-dd
* General purpose date data type
D aDateType2 S D DATFMT(*EUR) dd-mm-yyyy
* General purpose date data type
D aDateType3 S D DATFMT(*JUL) yy-dddf
The following are some C spec examples with dates
* Get current system date in Julian yyddd format
C TIME aDateType3
C *JUL0 MOVE aDateType3 wkJulDatX character yyddd
C *JUL MOVE aDateType3 wkJulDat numeric yyddd
* Convert time stamp date into a numeric data type loaded with a CYYMMDD date value
C MOVE SyTmSt2 SyDate2
C *CYMD MOVE SyDate2 SyCYMD2
* Convert time stamp time into a numeric data type loaded with a HHMMSS time value
C MOVE SyTmSt2 SyTime2
C *HMS MOVE SyTime2 SyHMS
* Convert time stamp into a character type
C MOVE SyTmSt2 myCharTmSt
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mustapha Alhiane
Sent: Tuesday, January 20, 2015 4:36 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Date type in RPG 400
Hello,
Can you tell me how we can affect a value in RPG400 to PF field with a type L (Date)?
Sincerlly,
Stéphane.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.