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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 686 views
  • 0 likes
  • 4 in conversation