SEC_TO_DT

The SEC_TO_DT function converts any number of seconds into IDLDT date/time values. The result is a date/time variable containing the converted values.

This function is useful for converting time stamps that count seconds to date/time values. Most time stamps count seconds from an arbitrary base date. For example, the UNIX time stamp counts seconds from January 1, 1970.

See idldt__define.pro for data/time system variables.

Calling sequence

Result = SEC_TO_DT( Secs )

Arguments

Secs

A scalar representing the number of seconds elapsed from the date specified in the system variable !DT_BASE.

Example

date = SEC_TO_DT(5000,00) ; Create a date 5000 seconds after the date contained in !DT.BASE.

See Also

DT_TO_VAR , IDLDT__DEFINE , STR_TO_DT