Command Reference : Function Reference : Function Reference: S
  
 
@strdate
 
String representation of the dates of the observation.
Syntax: @strdate(fmt)
fmt: date format string
Return: alpha
Fill an alpha series with workfile dates as strings, using the date format string fmt, for each observation in the workfile sample. Only observations in the workfile sample will be filled.
Date format syntax is outlined in “Date Formats”.
@strdate is a specialized form of a call to the @datestr function, applied to all of the observations in the workfile.
Examples
The commands
alpha wfdates1 = @strdate("yyyy/mm/dd")
alpha wfdates2 = @datestr(@date, "yyyy/mm/dd")
fill the alpha series WFDATES1 and WFDATES2 with the corresponding workfile dates in “yyyy/mm/dd” format.
alpha hmsdates = @strdate("yyyy-MM-DD HH:mi:ss")
fills the alpha series HMSDATES with the workfile dates in "yyyy-MM-DD HH:mi:ss" format.
Cross-references
See @datestr and @strnow for other functions to obtain date strings.
See @dateval for converting date strings to date numbers.