Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change date format

Status
Not open for further replies.

noway320

MIS
Aug 12, 2010
19
US
Hello Guys,

I need help for changing my date format.

cards;
19901225
19960906
19960305
;
These date are in yyyymmdd format,
I want to just flip that dates into mmddyyyy format.
So, my output will be
12251990
09061996
03051996
Please help me out.
Thanks!!
 

options missing='';

DATA Test;
infile datalines;
input sab yymmdd10. DOB yymmdd10.;
datalines;
19901225 19661225
19960906 19960605
19960305 19970804
99999999 00000000
;
run;

options missing=.;

options missing='';

data _NULL_;
set test;
file "C:\Documents and Settings\ctcnaik049\Desktop\CATVAL\date123.dat"
lrecl= 100;
format sab MMDDYYN8. DOB MMDDYYN8.;
put
sab
dob;
run;
options missing=.;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top