# setDateTimePrecision

> Change the precision for DateTime operations using eXtremeSQL.

> ### For an overview see page Managing Date/Time Fields in SQL

> ### Prototype

>         integer setDateTimePrecision( precision );

> ### Arguments

> precision | The integer value ranging from `1` (seconds) to `1000000000` (nanoseconds).

> ### Description

> > This function changes the precision for DateTime operations using eXtremeSQL by setting the internal value of `DATETIME_PRECISION`. The argument `precision` is an integer value ranging from 1 (to store the number of seconds) to 1000000000 (for the number of nanoseconds). The return value is the previous value of `DATETIME_PRECISION`.

> > It is important to note that the value of `DATETIME_PRECISION` is a per-process parameter; all processes working with the same database must set the same value for `DATETIME_PRECISION`. Respectively, all databases accessed from a given process will have the same precision.

> ### Example

>         XSQL>select setDateTimePrecision(1000);
>         #1
>         ------------------------------------------------------------------------------
>         1

> Note that if this `select` statement is executed by a remote client, the precision is set on the server.