PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

ALL ABOUT DATE /TIME / TIMESTAMP - 1

View previous topic View next topic Go down

ALL ABOUT DATE /TIME / TIMESTAMP - 1

Post  maran on Sat Apr 24, 2010 8:12 pm

D A T E F O R M A T S
NAME FORMAT SEPARATORS LENGTH *LOVAL *HIVAL
*CDMY CDD/MM/YY /-.,& 9 101/01/01 999/12/31
*CMDY CMM/DD/YY /-.,& 9 101/01/01 912/31/99
*CYMD CYY/MM/DD /-.,& 9 101/01/01 999/12/31
*DMY DD/MM/YY /-.,& 8 01/01/40 31/12/39
*EUR DD.MM.CCYY . 10 01.01.0001 31.12.9999
*ISO CCYY-MM-DD - 10 0001-01-01 9999-12-31
*JIS CCYYMMDD - 10 0001-01-01 9999-12-31
*JUL YY/DDD /-.,& 6 40/001 39/365
*LONGJUL CCYY/DDD /-.,& 8
*MDY MM/DD/YY /-.,& 8 01/01/40 12/31/39
*USA MM/DD/CCYY / 10 01/01/0001 12/31/9999
*YMD = YY/MM/DD /-.,& 8 40/01/01 39/12/31

T I M E F O R M A T S
NAME FORMAT SEPARATORS LENGTH *LOVAL *HIVAL
*hms hh:mm:ss :.,& 8 00:00:00 24:00:00
*iso hh.mm.ss . 8 00.00.00 24.00.00
*usa hh:mm AM : 8 12:00 AM 00:00 PM
hh:mm PM
*eur hh.mm.ss . 8 00.00.00 24:00.00
*jis hh:mm:ss : 8 00:00:00 24:00:00

T I M E S T A M P F O R M A T
FORMAT (LENGTH 26)
TS = ccyy-mm-dd-hh.mm.ss.mmmmmm *Loval 0001-01-01.01.00.00.000000
= '2003-09-26-15.16.26.531000' *Hival 9999-12-31.24.00.00.000000

When declaring a date or time fields in an RPG program, if DATFMT or TIMFMT is not specified on the D-spec, the formats will default to the DATFMT and TIMFMT specified on the H-spec. If these keywords are not defined on the H-spec, the format will default to *ISO.
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum