The today() function of SAS programming is basically used to generate current date. The format() function is used to display the format of the date in the specified format.
- In DD-MMM-YYYY format:
Example:
data _null_;dt=today();format dt yymmdd10.;put dt ;run;chevron_rightfilter_noneOutput:
- In DDMMMYYYY format:
Example:
data _null_;dt=today();format dt date9.;put dt ;run;chevron_rightfilter_noneOutput:
20JUL2019
- In MONTH DD, YYYY format:
Example:
data _null_;dt=today();format dt WORDDATE.;put dt ;run;chevron_rightfilter_noneOutput:
JULY 20, 2019
- In WEEKDAY, MONTH DD, YYYY format:
Example:
data _null_;dt=today();format dt date9.;put dt ;run;chevron_rightfilter_noneOutput:
Saturday, July 20, 2019
Recommended Posts:
- SAS | Date Formats and Informats
- Top Programming Languages for Data Science in 2020
- Top 5 Most Loved Programming Languages in 2020
- What happens when we call a Function
- Matrix operations using operator overloading
- How to take input in Octave GNU?
- Switch case statement in Octave GNU
- Comments in Octave GNU
- How to output in Octave GNU
- C Programming For Beginners - A 20 Day Curriculum!
- Python vs Java - Who Will Win the Battle in 2020?
- What is Standard Meta Language (SML)?
- Difference between C and Objective C
- Longest Increasing Subsequence having sum value atmost K
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

