mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-14 23:07:56 +02:00
step, date, time
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "Poco/Data/SQLite/Extractor.h"
|
||||
#include "Poco/Data/SQLite/Utility.h"
|
||||
#include "Poco/Data/Date.h"
|
||||
#include "Poco/Data/Time.h"
|
||||
#include "Poco/Data/BLOB.h"
|
||||
#include "Poco/Data/DataException.h"
|
||||
#include "Poco/DateTimeParser.h"
|
||||
@@ -205,6 +207,28 @@ bool Extractor::extract(std::size_t pos, char& val)
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Date& val)
|
||||
{
|
||||
std::string str;
|
||||
extract(pos, str);
|
||||
int tzd;
|
||||
DateTime dt = DateTimeParser::parse(Utility::SQLITE_DATE_FORMAT, str, tzd);
|
||||
val = dt;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Time& val)
|
||||
{
|
||||
std::string str;
|
||||
extract(pos, str);
|
||||
int tzd;
|
||||
DateTime dt = DateTimeParser::parse(Utility::SQLITE_TIME_FORMAT, str, tzd);
|
||||
val = dt;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, DateTime& val)
|
||||
{
|
||||
std::string dt;
|
||||
|
Reference in New Issue
Block a user