DADiSP Worksheet Functions > Function Categories > Time and Date Functions > UNIXDT

 

UNIXDT

Purpose:

Converts UNIX seconds to Julian date and clock seconds.

Syntax:

UNITXDT(ut, offset, "date")

(d, t) = UNIXDT(ut, offset, "date")

ut

-

A series of UNIX time values.

offset

-

Optional. A real, the time offset. Defaults to 0.0.

"date"

-

Optional. A string, the starting date in dd/mm/yy format. Defaults to "1-1-1970".

Returns:

A series of Julian dates.

 

(d, t) = UNIXDT(ut, offset, "date") returns the Julian dates and clock seconds.

Example:

W1: {1407159000, 1408159082, 1411150163, 1417159180, 1427159240}

W2: unixdt(W1)

 

W2 contains the date and time values:

 

 8-04-2014   13:30:00

 8-16-2014    3:18:02

 9-19-2014   18:09:23

11-28-2014    7:19:40

 3-24-2015    1:07:20

Example:

W3: {1407159000, 1408159082, 1411150163, 1417159180, 1427159240}

W4: (d, t) = unixdt(W3); ravel(d, t)

 

W4 contains the date and time values:

 

 8-04-2014   13:30:00

 8-16-2014    3:18:02

 9-19-2014   18:09:23

11-28-2014    7:19:40

 3-24-2015    1:07:20

Remarks:

UNIX time values are generally in seconds elapsed since 1-1-1970. UNIXDT converts the second values into Julian days and clock time for the day.

See Also:

DECDATE

DECTIME

DTXY

JULYMD

STRJUL

STRTOD

TODSTR

XYDT