HGETC: Storing the Current Date and Time as a Timestamp

How to:

The HGETC function returns the current date and time as a timestamp 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 as a Timestamp
HGETC(length, output_format)

where:

length

Integer

Is the number of characters returned as a timestamp. Valid values are:

8 for a timestamp in date-time format that includes milliseconds.
10 for a timestamp in date-time format that includes microseconds.

output_format

Date-Time

Is the newly created timestamp.



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