mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Added an example for reading time point values
This commit is contained in:
parent
c729387ab6
commit
60267ab952
@ -51,6 +51,8 @@ int DateTime(int, char* [])
|
||||
{
|
||||
std::cout << row.colDayPoint;
|
||||
std::cout << row.colTimePoint;
|
||||
const auto tp = std::chrono::system_clock::time_point{row.colTimePoint.value()};
|
||||
std::cout << std::chrono::system_clock::to_time_t(tp);
|
||||
}
|
||||
printer.reset();
|
||||
std::cerr << serialize(::sqlpp::value(std::chrono::system_clock::now()), printer).str() << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user