CURRENT

The CURRENT operator returns the current system date and time.

Syntax

CURRENT [ qual1 TO qual2 [(scale)] ]
  1. qual1, qual2 and scale define the date time qualifier.

Usage

The CURRENT operator returns the system date/time in the current local timezone.

This operator can be used to assign the current system date and time to a DATETIME variable.

Use optional datetime qualifiers to specify the precision of the returned value. The possible qualifiers are the same as in a DATETIME data type definition.

If the datetime qualifiers are not specified after the CURRENT keyword, the precision defaults to YEAR TO FRACTION(3) precision.

Example

MAIN
  DISPLAY CURRENT YEAR TO FRACTION(4)
  DISPLAY CURRENT HOUR TO SECOND
  DISPLAY CURRENT
END MAIN