Mastering Date Values in SAS Programming by Donovan Lemelin

Mastering Date Values in SAS Programming by Donovan Lemelin

Author:Donovan Lemelin [Lemelin, Donovan]
Language: eng
Format: azw3
Published: 2017-09-02T04:00:00+00:00


DatePart

The second main function is the one that allows you to convert datetime values to date values. It is the DatePart( ) function. The name on this one is self-explanatory. The function takes one argument, and it must be the numeric representation of the number of seconds from January 1, 1960. Putting it in similar nomenclature as the DHMS function, it would this: DatePart(<DateTime_Value>). This is what we have been referring to as the datetime values. The function will strip out the date from the datetime field and eliminate the fractional part that would represent. In a data step, it would be used like this to create a Date_Values field from a field called DateTime_Values: Date_Values = DatePart(DateTime_Values);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.