SOCI / soci

Official repository of the SOCI - The C++ Database Access Library
http://soci.sourceforge.net/
Boost Software License 1.0
1.37k stars 472 forks source link

How to read DATETIME(3) type in database? #1121

Closed q2013 closed 5 months ago

q2013 commented 5 months ago

I want to get DATETIME(3) type data from the database, that is, accurate to the millisecond level of data. But now the soci library directly converts the date type of data into std::tm type, the millisecond data is lost, how can I get it?

vadz commented 5 months ago

This is currently not supported, although there is #1093 which could help.

q2013 commented 5 months ago

Thank you for your answer. I converted the date type to string type in the library, and then parsed it with my own wrapper date-time class.