...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Type representing MySQL DATETIME
and TIMESTAMP
data types.
Defined in header <boost/mysql/datetime.hpp>
class datetime
Name |
Description |
---|---|
A |
Name |
Description |
---|---|
Converts |
|
datetime [constructor] |
Constructs a zero datetime. |
Retrieves the day component. |
|
Converts |
|
Retrieves the hour component. |
|
Retrieves the microsecond component. |
|
Retrieves the minute component. |
|
Retrieves the month component. |
|
Tests for equality. |
|
Tests for inequality. |
|
Retrieves the second component. |
|
Returns |
|
Retrieves the year component. |
Name |
Description |
---|---|
Returns the current system time as a datetime object. |
Name |
Description |
---|---|
Streams a datetime. |
Represents a broken datetime by its year, month, day, hour, minute, second
and microsecond components. This type is close to the protocol and should
not be used as a vocabulary type. Instead, cast it to a std::chrono::time_point
by calling as_time_point
or get_time_point
.
As opposed to time_point
,
this type allows representing invalid and zero datetimes.
Convenience header <boost/mysql.hpp>