Converts scalar or array valuesrepresenting dates and times to date/time variables.
mm A scalar or array containing month numbers (1 - 12).
dd A scalar or array containing day numbers (1 - 31).
hh A scalar or array containing hour numbers (0 - 23). If zero or not specified, hh is 0 hours.
mn A scalar or array containing minute numbers (0 - 59). If zero or not specified, mn is 0 minutes.
ss A scalar or array containing second numbers (0.0000 -59.9999). If zero or not specified, ss is 0.0 seconds.
If the year, month, and day values are all zero, then the value of the !DT_Base system variable is used for the date portion of the resulting date/time variable.
The parameters can be arrays of any numeric values, but all parameters must have the same dimension; that is, the parameters must be either all scalars or all arrays of the same size. Also you can only omit parameters from the end of the parameter list.
z = VAR_TO_DT(1992, 11, 22, 12, 30)
PRINT, z
{ 1992 11 22 12 30 0.00000 87728.521 0}
DT_PRINT, z
11/22/1992 12:30:00
years = [1992,1993] months = [3,4] days = [17,18]
y = VAR_TO_DT(years, months, days)
DT_PRINT, y
03/17/1992
04/18/1993
For more information, see the PV-WAVE User's Guide.