How to convert Julian date to YYYY-DD-MM
data t;
t=2013231;
t2=2013224;
run;
I used the function datejul() which converts julian date to a sas date value and then used the format yymmdd10. Need to check if there is format for yyddmm. Else we need to separate the month and day from the date and then concatenate them into yyddmm. if there is any other way , would like to know it
data t;
t=2013231;
t2=2013224;
t_=DATEJUL(t);
t2_=DATEJUL(t2);
format t_ t2_ yymmdd10.;
run;
Thanks,
Jagadish
You can convert a Julian date to a SAS date value with the DATEJUL function.
data t;
format date1 date2 yymmdd10.;
t=2013231;
t2=2013224;
date1=datejul(t);
date2=dateful(t2);
;
run;
I used the function datejul() which converts julian date to a sas date value and then used the format yymmdd10. Need to check if there is format for yyddmm. Else we need to separate the month and day from the date and then concatenate them into yyddmm. if there is any other way , would like to know it
data t;
t=2013231;
t2=2013224;
t_=DATEJUL(t);
t2_=DATEJUL(t2);
format t_ t2_ yymmdd10.;
run;
Thanks,
Jagadish
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.