Last active
July 31, 2019 15:41
-
-
Save statgeek/ca1906c14c0597a8cf7e225c3636bc4d to your computer and use it in GitHub Desktop.
SAS - datetime stamp for filenames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *This illustrates how to create a datetime stamp in the format of YYYYMMDDHHMM; | |
| %let fileTimeStamp = %sysfunc(date(), yymmddn8.)%sysfunc(putc(%sysfunc(time(), b8601TM6.), $4.)) ; | |
| %put &fileTimeStamp.; | |
| *Results from log; | |
| * 71 %let fileTime = %sysfunc(date(), yymmddn8.)%sysfunc(putc(%sysfunc(time(), b8601TM6.), $4.)) ; | |
| * 72 %put &fileTime.; | |
| * 201907310938; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment