Help using Base SAS procedures

Converting SASdate to Character and numeric

Reply
Occasional Contributor
Posts: 8

Converting SASdate to Character and numeric

How to convert the SAS data to character and numeric form?
Frequent Contributor
Posts: 127

Re: Converting SASdate to Character and numeric

Hello,

The SAS dates are stored as numeric by default. You should have a look to the different formats that you can apply to dates.

If you want to convert a SAS date into a character then I suggest you to use the put statement (refer to the online doc for more detailed informations).

e.g.

data test;
set ;

DateAsChar = put(DateVar, ddmmyy10.);
run;


I hope it helps.

Regards,
Florent
Super Contributor
Super Contributor
Posts: 3,174

Re: Converting SASdate to Character and numeric

Suggested Google advanced search argument, this topic / post:

using sas dates site:sas.com


Scott Barry
SBBWorks, Inc.
Occasional Contributor
Posts: 8

Re: Converting SASdate to Character and numeric

Thanks Florent, I was able to convert it successfully.
Ask a Question
Discussion stats
  • 3 replies
  • 137 views
  • 0 likes
  • 3 in conversation