Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Coonvert PD to Julian date format in SAS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
piglet

New User


Joined: 05 Sep 2006
Posts: 6

PostPosted: Thu Dec 14, 2006 2:19 pm    Post subject: Coonvert PD to Julian date format in SAS
Reply with quote

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.

Code:
../.?
00628
2010C


I need this to be able to calculate the difference between this date (20061208) and today's date (DATE()).

Thanks!
Back to top
View user's profile Send private message

Alan Voss

New User


Joined: 29 Nov 2006
Posts: 32
Location: Jacksonville, FL

PostPosted: Fri Dec 15, 2006 1:11 am    Post subject:
Reply with quote

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
View user's profile Send private message
piglet

New User


Joined: 05 Sep 2006
Posts: 6

PostPosted: Fri Dec 15, 2006 12:43 pm    Post subject:
Reply with quote

Thanks for your help!

This worked beautifully! icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm
No new posts Format issues using XMITIP MSGDD ssdjp1 CLIST & REXX 5 Mon Oct 23, 2017 8:47 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us