15 const double EPS = 1e-6;
19 #include "eckit/log/Timer.h"
26 using namespace eckit;
32 Timer t(
"Test DateAndTime function");
43 (*row)[0] = 20090706.0;
51 PathName(
"test_date_and_time.odb").unlink();
56 const string sql =
"select julian(date,time), year(date),month(date),day(date),hour(time),minute(time),second(time), timestamp(date,time) from \"test_date_and_time.odb\";";
58 Log::info() <<
"Executing: '" << sql <<
"'" << std::endl;
63 ASSERT(fabs((*it)[0] - 2455019.) <
EPS);
64 ASSERT((*it)[1] == 2009);
65 ASSERT((*it)[2] == 7);
66 ASSERT((*it)[3] == 6);
67 ASSERT((*it)[4] == 21);
68 ASSERT((*it)[5] == 1);
69 ASSERT((*it)[6] == 9);
70 ASSERT((*it)[7] == 20090706210109ll);
#define SIMPLE_TEST(name)
void setNumberOfColumns(size_t n)
int setColumn(size_t index, const std::string &name, api::ColumnType type)