DTTOX

Purpose:

Converts date and time values to series X values.

Syntax:

DTTOX(series, date, time, "timezone")

series

-

A series, the input series.

date

-

A string or series of Julian integer dates, the input date. Defaults to the current date.

time

-

 A string or series of time of day values, the input time. Defaults to the current time.

"timezone"

-

Optional. A string, the local time zone. Defaults to the current time zone. If specified, the resulting timestamps are based on UTC time.

 

Alternate Syntax:

DTTOX(series, datetime, "timezone")

series

-

A series, the input series.

datetime

-

An array, a datetime series where the date and time values are in adjacent columns.

"timezone"

-

Optional. A string, the local time zone. Defaults to the current time zone. If specified, the resulting timestamps are based on UTC time.

Returns:

A series of X values.

Example:

W1: gnorm(10, 1);setdate(w0, "1/1/2030");settime(w0, "12:00:00")

W2: {julstr("1/1/2030"), julstr("1/1/2030"), julstr("1/1/2030")};setvunits("Date");table

W3: {todstr("12:00:00"), todstr("12:00:04"), todstr("12:00:09")};setvunits("Time");table

W4: dttox(w1, w2, w3)

 

W1 contains the input data.

 

W2 contains a date series.

 

W3 contains a time series

 

W4 returns the X values {0, 4, 9} of W1 using the date values in W2 and the time values in W3

Example:

W1: gnorm(10, 1);setdate(w0, "1-1-2030");settime(w0, "12:00:00")

W2: idxtodt(w1, {1, 5, 10});table

W3: dttox(w1, w2)

 

W2 returns the date/time values of W1 using the X values {0, 4, 9}.

 

W3 returns the X values {0, 4, 9} from the date/time values in W1.

Remarks:

DTTOX converts the date and time values of an input series to the equivalent X values based on the start date and start time of the series.

 

See XTODT to convert X values to date time values.

 

See IDXTODT to convert indices to date/time values.

See Also:

DT2UNIX

DT2YMDHMS

DT2TIMESTAMP

DATE2DT

GETDT

IDXTODT

IDXTOX

XTODT

XTOIDX