Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbStringToTimeMsec

Convert a time in string format to CTTIMEMS packed format with millisecond precision.

NOTE: See ctdbStringToTime() if you don't need millisecond precision."

Declaration

CTDBRET ctdbDECL ctdbStringToTimeMsec(pTEXT pStr, CTTIME_TYPE TimeType, pCTTIMEMS pTime)

Parameters:

  • pStr [IN] - Time in string format
  • TimeType [IN] - One of the time types
  • pTime [OUT] - Packed time (with milliseconds)

Description

FairCom DB API function to convert a string to a timems value (time with milliseconds).

V11.5 and later support the CTTIME_HMST time format: Time is h|hh:mm:ss.ttt (24-hour time; t is milliseconds). The millisecond portion is optional, if missing it defaults to 0.

This function supports the CTTIME_HHMST mode, which forces the hour to be two digits and returns time as hh:mm:ss.ttt (24- hour time).

Return Values

Return CTDBRET_OK on success.

Value

Symbolic Constant

Explanation

0

CTDBRET_OK

Successful operation.

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

See Also

ctdbTimeMsecToString, ctdbStringToTime(), ctdbTimeToString()

TOCIndex