BookmarkSubscribeRSS Feed
mnew
Calcite | Level 5
Greetings:
New user here. Tired of looking up which date format to use from several sources. Does anyone know a good list of commonly used date format so I can just print out a cheatsheet? It is fun to dig for them but don't always have the time.
Thanks
5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
I'm a big fan of the documentation topic "Formats by Category"
http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/...

cynthia
mnew
Calcite | Level 5
Thank you. I will start from here and add some examples of formatted values.
Peter_C
Rhodochrosite | Level 12
I like to refer to the "informat hunter" http://listserv.uga.edu/cgi-bin/wa?A2=ind0705B&L=sas-l&P=58404 (which I posted to SAS-L a few years ago).
It is just SAS9 data step code trialling all available formats to demonstrate how a sample of your value could be read. Easy exercise to adapt to demonstrate formats instead of informats.
Rather than loop through your data, the "format hunter" loops through sashelp.vformat.
The PUT() function must have its format hard-coded at compile-time, but the putN(), and inputN() fumctions allow the format to be defined at run-time, so we can get SAS to replace the cheat-sheet at http://www.sascommunity.org/wiki/TS_486_Functions,_Informats,_and_Formats with a fully complete review of every single format/informat available in your session (including user-defined formats and informats). Vformat even provides the min and max widths valid for each format (except for user formats 😞 but ) It is a great resource

peterC
mnew
Calcite | Level 5
Thanks but not just for answering my specific question. I checked out the two resources you mentioned: http://www.sascommunity.org and the SAS-L....I've heard of them before yet never expected them to be useful for the very beginners. So much to learn from everywhere!
bschuemann
Calcite | Level 5

Did you ever find a cheat sheet of several most used dates and such? The list of all formats is a bit cumbersome.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 2457 views
  • 0 likes
  • 4 in conversation