Centurion date
Page 1 of 1
Centurion date
Dear PMS,
I am having a field in PF as " date 7p0"
I want to store this 'date' numeric field into a centurion date through rpg iv...
Try yourself and post it here...
More than one solutions expected...
I am having a field in PF as " date 7p0"
I want to store this 'date' numeric field into a centurion date through rpg iv...
Try yourself and post it here...
More than one solutions expected...
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Knowledge sharing
Hi,
cymd = cyymmdd = 1110324(today's date in centurion format)
DPSDS SDS <-program status data structure
D USER 358 367A
D DATE 191 198 0 <- getting today's date from ds
D TIME 282 287S 0
**CENTURION DATE FROM DATA STRUCTURE
D Cent DS
D C 1 1 inz('1')
D YR 2 3
D MTH 4 5
D DT 6 7
D CDT s 8A
Eval CDT = %Char(DATE)
Eval YR = %Subst(CDT:3:2)
Eval MTH = %Subst(CDT:5:2)
Eval DT = %Subst(CDT:7:2)
Eval DATe1 = %Dec(Cent:7:0) <- DATe1 =1110324 if DATE = 20110324
cymd = cyymmdd = 1110324(today's date in centurion format)
DPSDS SDS <-program status data structure
D USER 358 367A
D DATE 191 198 0 <- getting today's date from ds
D TIME 282 287S 0
**CENTURION DATE FROM DATA STRUCTURE
D Cent DS
D C 1 1 inz('1')
D YR 2 3
D MTH 4 5
D DT 6 7
D CDT s 8A
Eval CDT = %Char(DATE)
Eval YR = %Subst(CDT:3:2)
Eval MTH = %Subst(CDT:5:2)
Eval DT = %Subst(CDT:7:2)
Eval DATe1 = %Dec(Cent:7:0) <- DATe1 =1110324 if DATE = 20110324
Last edited by soundhar on Sun Mar 27, 2011 9:32 am; edited 1 time in total
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Re: Centurion date
Another one easiest way
DATE1=DATE2-19000000 WHERE DATE2 = 20110324
SO DATE1 WILL HAVE 1110324
DATE1=DATE2-19000000 WHERE DATE2 = 20110324
SO DATE1 WILL HAVE 1110324
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Re: Centurion date
Centurion date is calculated as
-->
1940 to 1999 = 0
and
2000 to 2039 = 1
regards
Soundhar
-->
1940 to 1999 = 0
and
2000 to 2039 = 1
regards
Soundhar
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Similar topics
» Last IPL date & time
» Last Change Date
» Last used date BRMS
» ALL ABOUT DATE /TIME / TIMESTAMP - 1
» DATE CONVERSION TIPS
» Last Change Date
» Last used date BRMS
» ALL ABOUT DATE /TIME / TIMESTAMP - 1
» DATE CONVERSION TIPS
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|