convert julian date of the format "2017.335" to normal date
Posted: Mon Jul 30, 2018 10:44 am
Hi All,
I am trying to convert some julian dates which are in the format like "2017.335" , "2018.106" etc into normal dates of the format YY/MM/DD .
I have tried the below code:
//STEP1 EXEC PGM=SORT,PARM='CENTWIN=80'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
2017335
2018106
//SORTOUT DD DSN=XXXXXX.dataset,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(3,5,Y2T,DT=(4MD/))
/*
Output: 2017/12/01
Output: 2018/04/16
But I want the output in the format YY/MM/DD and also when the Julian date is like " 2017.335 " , " 2018.106 " .
Can anyone please help me how I can achieve it ....
I am trying to convert some julian dates which are in the format like "2017.335" , "2018.106" etc into normal dates of the format YY/MM/DD .
I have tried the below code:
//STEP1 EXEC PGM=SORT,PARM='CENTWIN=80'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
2017335
2018106
//SORTOUT DD DSN=XXXXXX.dataset,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(3,5,Y2T,DT=(4MD/))
/*
Output: 2017/12/01
Output: 2018/04/16
But I want the output in the format YY/MM/DD and also when the Julian date is like " 2017.335 " , " 2018.106 " .
Can anyone please help me how I can achieve it ....