The STR_TO_DT function converts date and time string data to date/time values. The result is a IDLDT date/time structure containing the converted IDLDT date/time data.
You can convert only date strings, only time strings, or both date and time strings. The date portion of the date/time structure defaults to the value in the system variable !DT_BASE. The time portion of the resulting date/time variable defaults to zero.
Set this keyword to specify the format of the date portion of the data in the input string variable. The possible date format values are:
The asterisk, *, may represent any of the following separators: " - ", " / ", " , ", " . ", " : ". The default is Value 1.
Set this keyword to specify the format of the time portion of the data in the input variable. The possible time format values are:
The asterisk, *, represents one of the following separators: " - ", " / ", " , ", " : ".
No separators are allowed between hours and minutes for the -2 value. Both hours and minutes must occupy two spaces. The default is the -1 value.
dates =['14-Dec-1948','18-May-1943','29/Dec/1970','14/July/1971']
times = ['9:00:00', '6:00:00', '10:00:00', '5:00:00']
date_dt = STR_TO_DT(dates, times, DATE_FMT = 4)
;
Creates an array of three dates. By default,
TIME_FMT = -1.