Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

Time Types

CTTIME is declared as a 32-bit unsigned integer, stored as the number of seconds since midnight. The CTTIME type was implemented to be compatible with FairCom's r-tree and ODBC products.

c-treeDB provides functions and methods to allow the user to manipulate the CTTIME type in their applications.

Method

Operation

Pack

Pack a time from hour, minute, and second into a CTTIME form.

Unpack

Unpack a CTTIME time into hour, minute, and second.

TimeToString

Convert a packed time value into string format.

StringToTime

Convert a time in string form into a packed time. TimeType() gives the string form of the time value.

Hour

Retrieve the hour component of a packed time. The hour return is a 24-hour value. Example 11 pm is return as 23.

Minute

Retrieve the minute component of a packed time.

Second

Retrieve the second component of a packed time.

CurrentTime

Retrieve the current system time.

 Time Types can be one of the following string time formats:

c-treeDB
Symbolic Constant

c-treeDB .NET
Symbolic Constant


Description

CTTIME_HMSP

HMSP_TIME

Time is hh:mm:ss am|pm

CTTIME_HMP

HMP_TIME

Time is hh:mm am|pm

CTTIME_HMS

HMS_TIME

Time is hh:mm:ss (24 hour)

CTTIME_HM

HM_TIME

Time is hh:mm (24 hour)

CTTIME_MIL

MIL_TIME

Time is hhmm (military)

CTTIME_HHMST

 

Time is hh:mm:ss.ttt (24 hour)

TOCIndex