DT_CURRENT_TIME: Returning the Current Time

How to:

The DT_CURRENT_TIME function returns the current time provided by the running operating environment in date-time format, with a specified time precision. The date portion of the returned date-time value is set to zero.

Syntax: How to Return the Current Time

DT_CURRENT_TIME(component)

where:

component

Is one of the following time precisions.

  • SECOND.
  • MILLISECOND.
  • MICROSECOND.

Note: The field to which the value is returned must have a format that supports the time precision requested.

Example: Returning the Current Time

DT_CURRENT_TIME returns the current time in milliseconds.

DT_CURRENT_TIME(MILLISECOND)

For 5:23:13.098 p.m. (returned to a field with format HHISs), the result is 17:23:13.098.

WebFOCUS

Feedback