INFOR.DATETIME_TO_TIMESTAMP

This function allows you to add hours and minutes to a date or timestamp value. The result is a timestamp. Note that the result format may vary depending on the query tool. All Compass queries return values in UTC time.

Syntax

select infor.datetime_to_timestamp(datetimeproperty, 'hhmm')from dataobject

Example

select orderdate,infor.datetime_to_timestamp(orderdate,'0230') as updat ed_orderdate from orders

Result:

orderdate, updated_orderdate
2019-07-13T08:00:00.000Z, 2019-07-13T10:30:00.000Z

The first parameter is the date or timestamp value. Use single quotes around the value to signify a string literal.

The second parameter value of hhmm is the hours and minutes to add to the datetime. The hour range is 00-24, and the minute range is 00-59. If the parameter is 2400, the date part of the first parameter is used, and the time is set to 23:59:59.999.