View previous topic :: View next topic
|
Author |
Message |
piglet
New User
Joined: 05 Sep 2006 Posts: 6
|
|
|
|
Is there a way to convert a packed decimal format date into Julian Date?
I need to convert the value below 20061208 into a date format that SAS can understand.
I need this to be able to calculate the difference between this date (20061208) and today's date (DATE()).
Thanks! |
|
Back to top |
|
|
Alan Voss
New User
Joined: 29 Nov 2006 Posts: 32 Location: Jacksonville, FL
|
|
|
|
data dates;
infile dates;
input @1 pd_dt pd5.;
sas_dt = input(put(pd_dt,z8.),yymm8.);
format sas_dt yymmdd10.;
diff = today()-sas_dt;
run;
proc print data=dates;
run; |
|
Back to top |
|
|
piglet
New User
Joined: 05 Sep 2006 Posts: 6
|
|
|
|
Thanks for your help!
This worked beautifully! |
|
Back to top |
|
|
|