![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi, May anyone tell me how to change datetime with Unix format(Mon May 02 10:09:09 2005) to ANSI SQL format(2005-05-02 10:09:09) or directly convert time_t to ANSI SQL format string. I am developing a log program using C++ and Mysql. I want to inserting time data into a DateTime-type column. Mysql requires datetime with ANSI SQL format. However ctime ( time_t * time ) returns value like 'Mon May 02 10:09:09 2005'(datetime with Unix format). thx zlf |
![]() |
| Thread Tools | |
| Display Modes | |
| |