Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
q2013 opened this issue Jan 17, 2024 · 2 comments
Closed

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

q2013 opened this issue Jan 17, 2024 · 2 comments

Comments

@q2013
Copy link

q2013 commented Jan 17, 2024

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
Copy link
Member

vadz commented Jan 17, 2024

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

@q2013
Copy link
Author

q2013 commented Feb 5, 2024

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.

@q2013 q2013 closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants