Help using Base SAS procedures

DATE FORMATS

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 145
Accepted Solution

DATE FORMATS

Hi,

Can someone help me with following date format conversion.....

01-Feb-1994-----should be converted to ISO8601 FORMAT=1994-02-01

Thanks


Accepted Solutions
Solution
‎07-08-2015 09:44 AM
Super Contributor
Posts: 275

Re: DATE FORMATS

data _null_;

date="01-Feb-1994";

date1=input(date,anydtdte11.);

date2=put(date1,yymmdd10.);

format date1 yymmdd10.;

put _all_;

run;

View solution in original post


All Replies
Solution
‎07-08-2015 09:44 AM
Super Contributor
Posts: 275

Re: DATE FORMATS

data _null_;

date="01-Feb-1994";

date1=input(date,anydtdte11.);

date2=put(date1,yymmdd10.);

format date1 yymmdd10.;

put _all_;

run;

Frequent Contributor
Posts: 145

Re: DATE FORMATS

Perfect Thanks

Occasional Contributor
Posts: 19

Re: DATE FORMATS


There is a format that you can apply for ISO 8601 dates

format date1 E8601DA10.;

Try this

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 299 views
  • 0 likes
  • 3 in conversation