#include <CHMdateTimeClass.h>
This class provides convenient methods to access members of date/time columns in Chameleon tables.
Public Member Functions | |
CHMdateTime () | |
Default constructor. | |
CHMdateTime (time_t Time) | |
Construct a date/time object from a time_t value. | |
CHMdateTime (CHMdateTimeHandle Handle) | |
Constructor used in the internal implementation of Chameleon to construct a date/time object from a handle to the underlying Chameleon date/time object. | |
CHMdateTime (const CHMdateTime &Orig) | |
Copy constructor. | |
virtual | ~CHMdateTime () |
Destructor. | |
CHMdateTime & | operator= (time_t Time) |
Set the date/time to the value denoted by time_t quantity Time . | |
CHMdateTime & | operator= (const CHMdateTime &Orig) |
Assignment operator. | |
DATE | Date () const |
Get a floating point quantity that measures the number of days from midnight (12AM) 30 December 1899. | |
const CHMdateTimeHandle | DateTimeHandle () const |
Get the handle for the underlying date/time object. | |
int | Day () const |
Get the day of the month. | |
int | DayOfWeek () const |
Get the day of the week as an integer. | |
int | DayOfYear () const |
Get the day of the year. | |
CHMstring | Dump () const |
Output the current date/time to a string in the format Day/Month/Year Hour:Minute:Second (Time Zone). | |
int | Hour () const |
Get the hour of the day. | |
CHMboolean | IsNull () const |
Check if this date/time is null. | |
int | Minute () const |
Get the minute of the hour. | |
int | Month () const |
Get the month as an integer. | |
int | Second () const |
Get the second of the minute. | |
double | SecondFraction () const |
Get the fractional number of seconds. | |
CHMboolean | SetDate (int nYear, int nMonth, int nDay) |
Set the date to nYear/ | |
void | SetDate (DATE NewValue) |
Set the DATE to NewValue . | |
CHMboolean | SetDateTime (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec) |
Set the date to nYear/ and the time to nHour: | |
void | setNull () |
Set this date/time to null. | |
void | SetSecondFraction (double Value) |
Set the fractional number of seconds to Value . | |
CHMboolean | SetTime (int nHour, int nMin, int nSec) |
Set the time to nHour: | |
void | SetZone (short Value) |
Set the time zone with the short integer Value . | |
int | Year () const |
Get the year. | |
short | Zone () const |
Get a short integer indicating the time zone. | |
Static Public Member Functions | |
static CHMdateTime | Now () |
Get the current date/time. |
|
Default constructor.
|
|
Construct a date/time object from a
|
|
Constructor used in the internal implementation of Chameleon to construct a date/time object from a handle to the underlying Chameleon date/time object. This should not be called. |
|
Copy constructor.
|
|
Destructor.
|
|
Get a floating point quantity that measures the number of days from midnight (12AM) 30 December 1899. For example, 6AM 1 January 1900 is represented as 2.25. Hours and minutes are represented as fractional days, i.e., 0.25 * 24 hours = 6AM. OLE DATE quantity. |
|
Get the handle for the underlying date/time object. This is part of the internal implementation of Chameleon and should not be called. |
|
Get the day of the month. The range of possible return values is [1..31]. |
|
Get the day of the week as an integer. The range of possible return values is [1..7] where 1=Sun, 2=Mon, etc. |
|
Get the day of the year. The range of possible return values is [1..365] where Jan 1st = 1, etc. |
|
Output the current date/time to a string in the format Day/Month/Year Hour:Minute:Second (Time Zone). For example, February 28, 1977 12:34pm EST would be output as 28/02/1977 12:34:00 (zone -5). |
|
Get the hour of the day. The range of possible return values is [0..23]. |
|
Check if This is very useful for determining whether or not a date/time is present in a message. |
|
Get the minute of the hour. The range of possible return values is [0..59]. |
|
Get the month as an integer. The range of possible return values is [1..12] where January = 1, February = 2, etc. |
|
Get the current date/time. Static operator. |
|
Assignment operator.
|
|
Set the date/time to the value denoted by Returns the resulting date/time object. |
|
Get the second of the minute. The range of possible return values is [0..59]. |
|
Get the fractional number of seconds.
|
|
Set the DATE to
See |
|
Set the date to Returns true if the date is valid. |
|
Set the date to Returns true if the date/time is valid. |
|
Set
|
|
Set the fractional number of seconds to
|
|
Set the time to Returns true if the time is valid. |
|
Set the time zone with the short integer
|
|
Get the year.
|
|
Get a short integer indicating the time zone.
|