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 .NET provides the class CTDateTime that exposes the following set of 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.

TOCIndex