CTDATETIME is declared as a double type and stores both the date and time. This type is also called a time stamp. The date component of a CTDATETIME value is stored as the value on the left of the decimal point, while the time component is stored as the value on the right side of the decimal point.
c-treeDB API provides functions and methods to manipulate the CTDATETIME type.
Function |
Operation |
---|---|
ctdbDateTimePack |
Pack a date and time into a CTDATETIME value. |
ctdbDateTimeUnpack |
Unpack a CTDATETIME value into year, month, day, hour, minute and second. |
ctdbDateTimeGetDate |
Retrieve the CTDATE component of a CTDATETIME value; |
ctdbDateTimeGetTime |
Retrieve the CTTIME component of a CTDATETIME value. |
ctdbDateTimeSetDate |
Replace the CTDATE component of a CTDATETIME value. |
ctdbDateTimeSetTime |
Replace a CTTIME component of a CTDATETIME value. |
ctdbDateTimeToString |
Convert a CTDATETIME to string. |
ctdbStringToDateTime |
Convert a string to CTDATETIME. |
ctdbCurrentDateTime |
Retrieve the system current date and time. |
ctdbServerDateTime |
Retrieves the current server-side date and time (V11 and later). |