![]() While the %Eval function is used for most of the Macro language’s numeric operations, it also performs character comparisons. In Macro language, you must use the literal values inside the %Sysevalf function. data ex Ĭreate a Date and DateTime variable with any date Data _null_ ĭate =put(Input('01SEP2021', Date9.),date9.) ĭateTime=put(Input('01SEP2021:12:30:00', DateTime18.),datetime20.) ĭateTime=01SEP2021:12:30:00 Macro Equivalent to create a data and DateTime variable with any date ![]() The DateTime function Writes the DateTime values in the form ddmmmyy:hh:mm:ss.ss. So to view it as a date, apply the desired format. The today() or date() function can be assigned to a variable in a SAS dataset since SAS dates are represented as the number of days from January 1, 1960. WEEKDATX Mon, Date formats in SAS Create a New SAS Variable with Today’s Date Date Format SAS Formats Example DDMMMYYYY date9. ![]() Here are some date formats you can use to display the current date in SAS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |