DT_PRINT Procedure

Standard Library procedure that prints the value in date/time variables in a readable format.

Usage

    DT_PRINT, dt_var

Input Parameters

dt_var — A date/time variable containing one or more date/time structures.

Keywords

None.

Discussion

The system variables !Date_Separator and !Time_Separator determine which characters are used to separate the date and time elements in the output. The default delimiter for dates is a slash (/), and the default delimiter for printing times is a colon (:). For example:

    4/2/1992 7:7:51

You can change these separators by changing the values of !Date_Separator and !Time_Separator.

Examples

x = STR_TO_DT(['04/06/2001'], ['14:34:54'], Date_Fmt=1, $
              Time_Fmt=-1)
DT_PRINT, x
; PV-WAVE prints: 04/06/2001   14:34:54.000
PRINT, x
; PV-WAVE prints: { 2001  4  6  14  34  54.0000  90785.608  0}
dtarray = DTGEN(x, 4)
DT_PRINT, dtarray
; PV-WAVE prints: 
; 04/06/2001   14:34:54.000
; 04/07/2001   14:34:54.000
; 04/08/2001   14:34:54.000
; 04/09/2001   14:34:54.000

See Also

System Variables:!Date_Separator, !Time_Separator

For more information on date/time, see the PV‑WAVE User Guide.