How to: |
The HNAME function extracts a specified component from a date-time value and returns it as digits in alphanumeric format.
HNAME(datetime, 'component', output)
where:
Date-time
Is the date-time value from which a component value is to be extracted.
Alphanumeric
Is the name of the component to be retrieved enclosed in single quotation marks. For a list of valid components, see Arguments for Use With Date and Time Functions.
Alphanumeric, at least A2
The function converts all other components to strings of digits only. The year is always four digits, and the hour assumes the 24-hour system.
Assuming that the current time obtained by the function HGETC in the first parameter is 13:22:11, this example returns the string '13' and assigns it to AHOUR:
AHOUR/A2 = HNAME(HGETC(8,'HYYMDS'),'HOUR', AHOUR);
Assuming that the current time obtained by the function HGETC in the first parameter is 13:22:11, this example returns the string '13' and assigns it to AHOUR:
AHOUR/A2 = HNAME(HGETC(8,'HYYMDS'),'HOUR', AHOUR);
iWay Software |