How to: |
The HSETPT function inserts the numeric value of a specified component into a date-time value.
HSETPT(timestamp, component, value, length, output_format)
where:
Date-Time
Is the timestamp into which a component value is to be inserted.
Alphanumeric
Is the name of the component to be incremented.
For a list of valid components, see Date and Time Components For Date and Date-Time Functions.
Integer
Is the numeric value to be inserted for the requested component.
Integer
Is the number of characters returned as a timestamp. Valid values are:
Date-Time
Is the timestamp whose chosen component is updated. All other components are copied from the timestamp.
Assuming that the current date and time obtained by HGETC in the first parameter are 03/31/2004 and 13:34:36, this example,
UHOUR/HMDYYS = HSETPT(HGETC(8,'HYYMDS'),'HOUR', 7, 8, UHOUR);
returns 03/31/2004 07:34:36.
iWay Software |