DATA Step, Macro, Functions and more

Informat for '02-JUN-09'

Reply
Frequent Contributor
Posts: 99

Informat for '02-JUN-09'

Hi everyone,
I am looking for the informat for date in the form of '02-JUN-09' .

I appreciate all your help.
Thanks,

Amit
SAS Super FREQ
Posts: 8,743

Re: Informat for '02-JUN-09'

Hi:
Look at the ANYDTDTE informat. It reads dates in a variety of input formats.
cynthia
Valued Guide
Posts: 2,175

Re: Informat for '02-JUN-09'

on SAS9.2, that can be read with informat date12.
as demo in this log snippet:[pre]46 data ;
47 input ndate date12. @1 card $char20. ;
48 put 'card=' card $char20. ndate= date9. ;
49 cards ;

card= 1jan22 ndate=01JAN1922
card= 21jun09 ndate=21JUN2009
card= 22-jun-08 ndate=22JUN2008
card= 11-Jun-2009 ndate=11JUN2009
card= 12Jun-2009 ndate=12JUN2009
card= 13-Jun2009 ndate=13JUN2009
NOTE: The data set WORK.DATA6 has 6 obs[/pre]
Does it also work in SAS913?

PeterC
Super Contributor
Super Contributor
Posts: 3,174

Re: Informat for '02-JUN-09'

Yes - the results were equivalent with SAS 9.1.3 SP4.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 3 replies
  • 123 views
  • 0 likes
  • 4 in conversation