Product Documentation

V11.5 Update Guide

Previous Topic

Next Topic

ctdbTimeMsecToString and ctdbStringToTimeMsec

New c-treeDB functions allow you to convert a string to a timems value (time with milliseconds).

The string format does not support milliseconds: the milliseconds will either be lost (toString) or set to 0 (toTimeMsec). In the future the string format will be extended to support milliseconds.

ctdbTimeMsecToString

Convert a packed CTTIMEMS into a string

Prototype:

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

Returns:

Return CTDBRET_OK on success.

ctdbStringToTimeMsec

Convert a time in string format to CTTIMEMS packed format.

Prototype:

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)

Returns:

Return CTDBRET_OK on success.

TOCIndex