ROUND_MILLISECONDS_UDF (TIMESTAMP_TZ)

Definition

This user-defined function (UDF) is a function that rounds milliseconds to increments of 0, 3, or 7 milliseconds. Transact automatically rounds the milliseconds of datetime values.

ROUND_MILLISECONDS_UDF(INPUT TIMESTAMP_TZ)

Parameters

INPUT TIMESTAMP_TZ

The input time to be rounded.

Returns

Returns the same input TIMESTAMP_TZ value but with the milliseconds rounded.

Usage example

Input:

SELECT PUBLIC.ROUND_MILLISECONDS_UDF('1900-01-01 00:00:00.995 +0100')

Output:

'1900-01-01 00:00:00.997 +0100'

Last updated