libodbc++  0.2.5
Public Member Functions | List of all members
odbc::Date Class Reference

An SQL DATE. More...

#include <types.h>

Inheritance diagram for odbc::Date:
odbc::Timestamp

Public Member Functions

 Date (int year, int month, int day)
 Constructor.
 
 Date ()
 Constructor.
 
 Date (std::time_t t)
 Constructor.
 
 Date (const std::string &str)
 Constructor.
 
 Date (const Date &d)
 Copy constructor.
 
Dateoperator= (const Date &d)
 Assignment operator.
 
virtual ~Date ()
 Destructor.
 
virtual void setTime (std::time_t t)
 Sets this date to the specified time_t value.
 
std::time_t getTime () const
 Returns the time_t value of 00:00:00 at this date.
 
void parse (const std::string &str)
 Sets this date from a string in the YYYY-MM-DD format.
 
int getYear () const
 Gets the year of this date.
 
int getMonth () const
 Gets the month of this date.
 
int getDay () const
 Gets the monthday of this date.
 
void setYear (int year)
 Sets the year of this date.
 
void setMonth (int month)
 Sets the month of this date.
 
void setDay (int day)
 Sets the day of this date.
 
virtual std::string toString () const
 Gets the date as a string in the YYYY-MM-DD format.
 

Detailed Description

An SQL DATE.

Constructor & Destructor Documentation

odbc::Date::Date ( )
explicit

Constructor.

Sets this date to today.

odbc::Date::Date ( std::time_t  t)

Constructor.

Sets this date to the specified time_t value.

odbc::Date::Date ( const std::string &  str)

Constructor.

Sets this date to the specified string in the YYYY-MM-DD format.


The documentation for this class was generated from the following file:

Go back to the libodbc++ homepage