Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

LOCALTIMESTAMP SQL Function

Syntax

LOCALTIMESTAMP( [timestamp_precision] )

Description

The scalar function LOCALTIMESTAMP returns current date and time as TIMESTAMP value. This function takes an optional argument which decides the milliseconds precision in the result. The optional argument timestamp_precision is an integer ranging between 0 and 9.

FairCom DB SQL statements can refer to LOCALTIMESTAMP anywhere they can refer to a TIMESTAMP expression.

Example

SELECT LOCALTIMESTAMP(3) 'localtimestamp' FROM

admin.syscalctable ;

LOCALTIMESTAMP

--------------

12/05/2004 12:25:000

1 record selected

Details

The timestamp_precision value is always set as 3 irrespective of what the user has specified and milliseconds is always returned as ‘000’.

TOCIndex