Using below simple REXX code one can covert Gregorian date to Julian format. Below code convert date with format CCYYMMDD to YYDDD format.
DATEIN = '20121205'
XYZ = DATE('D',DATEIN,'S')
JULDAT = RIGHT(SUBSTR(DATEIN,3,2),2,'0')||RIGHT(XYZ,3,'0')
This can be further updated to convert the date in YYYYDDD format.
DATEIN = '20121205'
XYZ = DATE('D',DATEIN,'S')
JULDAT = RIGHT(SUBSTR(DATEIN,1,4),2,'0')||RIGHT(XYZ,3,'0')
DATEIN = '20121205'
XYZ = DATE('D',DATEIN,'S')
JULDAT = RIGHT(SUBSTR(DATEIN,3,2),2,'0')||RIGHT(XYZ,3,'0')
This can be further updated to convert the date in YYYYDDD format.
DATEIN = '20121205'
XYZ = DATE('D',DATEIN,'S')
JULDAT = RIGHT(SUBSTR(DATEIN,1,4),2,'0')||RIGHT(XYZ,3,'0')
No comments:
Post a Comment