Skip to main content

TimePrecision

Set the default time precision for SQL scalar time functions.

Synopsis

[SQL]    TimePrecision=n

n is an integer in the range 0—9. The default value is 0.

Description

TimePrecision defines the default number of decimal places in the value returned by the SQL scalar functions GETDATE(), CURRENT_TIME, CURRENT_TIMESTAMP, GETUTCDATE, and UNIX_TIMESTAMP. A value returned by these function has n decimal places for fractional seconds. The actual precision possible is platform dependant; precision digits in excess of the precision available on your system are returned as zeros.

Changing This Parameter

On the SQL page of the Management Portal (System Administration > Configuration > SQL and Object Settings > SQL), for the Default time precision for GETDATE(), CURRENT_TIME, and CURRENT_TIMESTAMP setting, select a number of decimal places.

To set the desired value for TimePrecision from the Terminal, use the SetOption(“DefaultTimePrecision”)Opens in a new tab method of the %SYSTEM.SQL.UtilOpens in a new tab class. See the class reference for details.

You can also change TimePrecision with the Config.SQLOpens in a new tab class (as described in the class reference), by editing the CPF in a text editor (as described in Editing the Active CPF), or by using the SET OPTION command.

FeedbackOpens in a new tab