hi guys.
When trying to convert this number x=123199 to a date using format date9. i get 4/22/97 but if i use the put + input functions i get different results :
x=123199 ;
xchar = put(x,z6.) ;
xdate = input (xchar, mmddyy6.) ;
format xdate date9. ;
so xdate=31/dec/99 in this case.
So how come?
Hi,
The string "123199" is read like the date 12/31/99 whereas the number 123199 is the number of days between 01JAN1960 and 22APR2297, which is the date you get when converting 123199 into a date.
PG
Hi,
The string "123199" is read like the date 12/31/99 whereas the number 123199 is the number of days between 01JAN1960 and 22APR2297, which is the date you get when converting 123199 into a date.
PG
right right,did not think of it!
Thanks so much
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.