How to: |
The HCNVRT function converts a date-time value to alphanumeric format for use with operators such as EDIT, CONTAINS, and LIKE.
HCNVRT(datetime, '(format)', length, output)
where:
Date-time
Is the date-time value to be converted.
Alphanumeric
Is the format of the date-time field enclosed in parentheses and single quotation marks. It must be a date-time format (data type H, up to H23).
Integer
Is the number of characters in the alphanumeric field that is returned. If length is smaller than the number of characters needed to display the alphanumeric field, the function returns a blank.
Alphanumeric
Assume that you have a date-time field DTCUR in H format. To convert this timestamp to an alphanumeric string, use the following syntax:
HCNVRT(DTCUR, '(HMDYYS)', 20, 'A20')
The function returns the string '03/26/2004 14:25:58' that is assignable to an alphanumeric variable.
iWay Software |