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
SAS Super FREQ
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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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