Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

Date/Time (Timestamp) Types

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 provides functions and methods to manipulate the CTDATETIME type.

Method

Operation

Pack

Pack a date and time into a CTDATETIME value.

Unpack

Unpack a CTDATETIME value into year, month, day, hour, minute, and second.

GetDate

Retrieve the CTDATE component of a CTDATETIME value.

GetTime

Retrieve the CTTIME component of a CTDATETIME value.

DateTimeToString

Convert a CTDATETIME to string.

StringToDateTime

Convert a string to CTDATETIME.

DateTimeToTDateTime

Convert a CTDATETIME type value into a double containing a delphi TDateTime value.

TDateTimeToString

Convert a double containing a delphi TDateTime value to a string.

StringToTDateTime

Convert a date and time in a string to a double containing a delphi TDateTime value.

TDateTimeGetDate

Retrieve a CTDATE type value from a double containing a delphi TDateTime value.

TDateTimeGetTime

Retrieve a CTTIME type value from a double containing a delphi TDateTime value.

TDateTimeGetTimeMsec

Retrieve a CTTIMEMS type value from a double containing a delphi TDateTime value.

TDateTimeToDateTime

Convert a double containing a delphi TDateTime value into a CTDATETIME type value.

TOCIndex