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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS dates, can you save it in a character format?

Status
Not open for further replies.

cosmid

Programmer
Feb 14, 2008
73
US
I have a SAS data sets with a few date variables. I need to save them in mmddyy8. format so that some Access file can read it in mmddyy8. format. With informat and format, both doesn't save the date in mmddyy8. format permanently.

I used datepart, and the results are 0s. This is what I did:

data new;
set old;
newVar = datepart(oldVar);
run;
 
I got it! Sorry to bother those who clicked on the thread. I don't know how to remove a submitted thread.

This is what I did and it worked.

data new (keep = Call_Date calldate);
set old;

calldate = put(Call_Date, mmddyy8.);
run;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top