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.
精彩评论