converting character string to date format
From sasCommunity
sasCommunity Forum : sasCommunity - general site feedback : converting character string to date formatBy Subbuvk on Wed Nov 07, 2007 2:02 pm
Hello everyone.
I have a data set in which the date is $10. format (typical value-11/10/1972). I need to convert this into a Date9. format. Any suggestions?
Private Message | Personal Page | Quote
By Jpovey on Fri Nov 09, 2007 11:14 am
First you need to convert the string into a sas numeric. This can be done with the INPUT function. Then once loaded as a numeric you can format the field as DATE9.
Example:
sasDATE=INPUT(yourdate,MMDDYY10.);
format sasDATE DATE9.;
Private Message | Personal Page | Quote
Showing page 1/1
Forum section Powered by MWBB
