itazev Posted April 4, 2007 Share Posted April 4, 2007 Hey there! I started with mysql a few days ago and now I don't know how to insert data in a DATE filed type mysql> insert into employee values (NULL, 'Jeferson', date('15/02/2003'), 'Accoun tant', '500.25', '1', '42'); All the values are stored normally except when I try to store it with the date. (I tried a search but i get more confused yet) Thank you for any information! Quote Link to comment https://forums.phpfreaks.com/topic/45618-solved-store-date-problem/ Share on other sites More sharing options...
fenway Posted April 4, 2007 Share Posted April 4, 2007 Well, assuming you have that format, you need to use the STR_TO_DATE() function. Quote Link to comment https://forums.phpfreaks.com/topic/45618-solved-store-date-problem/#findComment-221575 Share on other sites More sharing options...
itazev Posted April 4, 2007 Author Share Posted April 4, 2007 thank you buddy! it worked Quote Link to comment https://forums.phpfreaks.com/topic/45618-solved-store-date-problem/#findComment-221588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.