HGETZ: Storing the Current Coordinated Universal Time in a Date-Time Field

How to:

HGETZ provides the current Coordinated Universal Time (UTC/GMT time, often called Zulu time). UTC is the primary civil time standard by which the world regulates clocks and time.

The value is returned in the desired date-time format. If millisecond or microsecond values are not available in your operating environment, the function retrieves the value zero for these components.


Top of page

x
Syntax: How to Store the Current Universal Date and Time in a Date-Time Field
HGETZ(length, output)

where:

length

Integer

Is the length of the returned date-time value. Valid values are:

  • 8 indicates a time value that includes milliseconds.
  • 10 indicates a time value that includes microseconds.
  • 12 indicates a time value that includes nanoseconds.
output

Date-time

Is the returned date-time value.



Example: Storing the Current Universal Date and Time as a Timestamp

This example,

HGETZ(8, 'HYYMDS')

creates a timestamp representing the current date and time.


iWay Software