HGETC: Storing the Current Date and Time in a Date-Time Field

How to:

The HGETC function returns the current date and time 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 Date and Time in a Date-Time Field
HGETC(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 Date and Time as a Timestamp

This example,

HGETC(8, 'HYYMDS')

creates a timestamp representing the current date and time.


iWay Software