HHMS: Converting a Date-Time Value to a Time Value

How to:

The HHMS function converts a date-time value to a time value.


Top of page

x
Syntax: How to Convert a Date-Time Value to a Time Value
HHMS(datetime, length, output)

where:

datetime

Date-time

Is the date-time value to be converted.

length

Numeric

Is the length of the returned time value. Valid values are:

  • 8 indicates a time value that includes milliseconds.
  • 10 indicates a time value that includes microseconds.
  • 12 indicates a time value that includes nanoseconds.
output

Time



Example: Converting a Date-Time Value to a Time value

HHMS converts the date-time field TRANSDATE to a time value with format HHIS:

HHMS(TRANSDATE, 8, 'HHIS')

For 2000/06/26 05:45, the output is 05:45:00


iWay Software