How to: |
The HSETPT function inserts the numeric value of a specified component into a date-time value.
HSETPT(datetime, 'component', value, length, output)
where:
Date-time
Is the date-time value in which to insert the component.
Alphanumeric
Is the name of the component to be inserted enclosed in single quotation marks. See Arguments for Use With Date and Time Functions for a list of valid components.
Integer
Is the numeric value to be inserted for the requested component.
Integer
Is the length of the returned date-time value. Valid values are:
Date-time
Is the returned date-time value whose chosen component is updated. All other components are copied from the source date-time value.
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 |