DATA Step, Macro, Functions and more

Date Format

Reply
Contributor QLi
Contributor
Posts: 59

Date Format

I want to run the following code:

data _null_;
a='August 24, 2010';
format b date9.;
b=input(a, worddate20.);
put a= b=; run;


It showed the message in the Log window:
NOTE 485-185: Informat WORDDATE was not found or could not be loaded.


Could you help me out this?

Thanks in Advance.
PROC Star
Posts: 7,471

Re: Date Format

You need an informat rather than a format. You could use:
[pre]
data _null_;
a='August 24, 2010';
format b date9.;
b=input(a, anydtdte20.);
put a= b=; run;
[/pre]
HTH,
Art
Contributor QLi
Contributor
Posts: 59

Re: Date Format

It worked well.

Thank you very much.
Ask a Question
Discussion stats
  • 2 replies
  • 487 views
  • 0 likes
  • 2 in conversation