vinoindiamca Posted December 20, 2008 Share Posted December 20, 2008 Hi insert into booking values(NULL,'fghfg','hgfhgf','hfgh','05-Dec-2002','27-Dec-2008',1,'dfg','gdfg','dfgfgfgdfgdfg','dfgdf',2) How to Format date from 05-Dec-2002 to 2002-12-05 please help in this Link to comment https://forums.phpfreaks.com/topic/137815-date-format-is-12-dec-2008-need-to-save-as-2008-12-12/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 20, 2008 Share Posted December 20, 2008 You can use the mysql STR_TO_DATE() function directly in your query string to format any date into a standard DATE data type - http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_str-to-date Link to comment https://forums.phpfreaks.com/topic/137815-date-format-is-12-dec-2008-need-to-save-as-2008-12-12/#findComment-720293 Share on other sites More sharing options...
vinoindiamca Posted December 20, 2008 Author Share Posted December 20, 2008 Hi insert into booking values(NULL,'fghfg','hgfhgf','hfgh','05-Dec-2002','27-Dec-2008',1,'dfg','gdfg','dfgfgfgdfgdfg','dfgdf',2) How to Format date from 05-Dec-2002 to 2002-12-05 please help in this STR_TO_DATE() is Not Working in insert query please use it in my query Link to comment https://forums.phpfreaks.com/topic/137815-date-format-is-12-dec-2008-need-to-save-as-2008-12-12/#findComment-720296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.