ToTimestamp

Converts a date or a date and time value into a timestamp.

Variants

ToTimestamp(Date date)

Returns a timestamp that corresponds to 12:00 am of the given date in the local time zone (midnight at the beginning of the date).

Parameters

date
The date value you want to convert.

Returns

Timestamp

Examples

ToTimestamp(Date date, Time time)

Returns a timestamp that corresponds to the given time on the given date in the local time zone.

Parameters

date
The date value you want to convert.
time
The time value you want to convert.

Returns

Timestamp

Examples

ToTimestamp(Date date, Time time, Text timezone)

Returns a timestamp that corresponds to the given time on the given date in the specified time zone.

Parameters

date
The date value you want to convert.
time
The time value you want to convert.
timezone
The timezone date and time arguments provided in, out of the list of valid timezone identifiers.

Returns

Timestamp

Examples