Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbStringToDate

Convert a date in string format to CTDATE packed format.

Declaration

CTDBRET ctdbStringToDate(pTEXT pStr, CTDATE_TYPE DateType,

pCTDATE pDate)

Description

ctdbStringToDate() converts a date in string format to CTDATE packed format. Use ctdbDateToString() to convert a packed CTDATE into a string.

  • pStr [in] the pointer to the string.
  • DateType [in] the date type. Valid types are listed in c-treeDB API Data Types.
  • pDate [out] the pointer to date that will result from the conversion.

Returns

ctdbStringToDate() returns CTDBRET_OK on success, or c-treeDB API C error on failure.

The possible errors associated with ctdbStringToDate() are:

  • CTDBRET_NULARG (4007): Null argument not valid in pStr
  • CTDBRET_NOMEMORY (4001): Not enough memory
  • CTDBRET_INVFORMAT (4028): Invalid format in DateType
  • CTDBRET_INVDATE (4029): Invalid packed CTDATE

See also

ctdbStringToTime(), ctdbDateToString()

TOCIndex