Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbTimeMsecToString

Convert a packed CTTIMEMS into a string with millisecond precision.

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

Declaration

CTDBRET ctdbDECL ctdbTimeMsecToString(CTTIMEMS Time, CTTIME_TYPE TimeType, pTEXT pStr, VRLEN size)

Parameters:

  • Time [IN] - The Time value to convert
  • TimeType [IN] - One of the time types
  • pStr [OUT] - Time in string format
  • size [IN] - Size of the Time parameter

Description

c-treeDB API function to convert a timems value (time with milliseconds) to a string.

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).

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

ctdbStringToTimeMsec(), ctdbStringToTime(), ctdbTimeToString()

TOCIndex