Command Reference : Function Reference : Function Reference: O
  
 
@otod
Workfile observation to date string.
Syntax: @otod(n)
n: integer
Return: string
Returns a string identifying the date or observation corresponding to observation number n, counted from the beginning of the current workfile. Invalid inputs will produce an empty string.
EViews will use the global default settings for the Month/Day order in dates to determine the ordering of days and months in the resulting date string.
Examples
For example, consider the string assignment
@otod(5)
For an annual workfile dated 1991–2000, the function returns the string “1995”. For a quarterly workfile dated 1970q1–2000q4, the function returns “1971q1”.
@otod(1)
returns the date or observation label for the start of the workfile.
If the series DSER contains integer workfile observation numbers,
alpha aser = @dtoo(dser)
fills ASER with string dates corresponding to the workfile observation numbers for each observation in the workfile sample.
If DVEC is a a vector containing integer observations numbers, the command
vector avec = @dtoo(dvec)
fills AVEC with the date strings corresponding to the workfile observation numbers in DVEC.
Cross-references
See also @otods and @dtoo.