BookmarkSubscribeRSS Feed
AmitKB
Fluorite | Level 6
Hi everyone,
I am looking for the informat for date in the form of '02-JUN-09' .

I appreciate all your help.
Thanks,

Amit
3 REPLIES 3
Cynthia_sas
Diamond | Level 26
Hi:
Look at the ANYDTDTE informat. It reads dates in a variety of input formats.
cynthia
Peter_C
Rhodochrosite | Level 12
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
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Yes - the results were equivalent with SAS 9.1.3 SP4.

Scott Barry
SBBWorks, Inc.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2083 views
  • 0 likes
  • 4 in conversation