开发者

How can MySQL dates be used in C++?

开发者 https://www.devze.com 2023-03-13 00:13 出处:网络
I\'m using connector/c++ to build some MySQL C++ programs, and one thing I\'ve run into is using dates. I can\'t see开发者_开发问答m to find this anywhere. What would be the best way to use MySQL date

I'm using connector/c++ to build some MySQL C++ programs, and one thing I've run into is using dates. I can't see开发者_开发问答m to find this anywhere. What would be the best way to use MySQL dates in C++?

More specifically, is there a date class or data type that can store MySQL dates that can be inserted into prepared statements in a method similar to setInt() or setString()?


You'll find the answers to this question illuminating. Boost and MFC have a date and time class, but standard C++ does not. You'll have to do the conversion yourself, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号