|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Peeps,
I'm developing a simple web application using php3 and mysql. My problem is the mysql date format. I'm using dates of the form YYYY-MM-DD, just as mysql likes. The problem is if I make a query using a date in that same format, mysql does not match it up correctly with dates stored in the table. It only works if I ditch the delimiters like YYYYMMDD. I can work around the problem, but it's been bugging me why it won't work. Any Ideas? Is it me? PS Devshed ROCKS!! |
|
#2
|
|||
|
|||
|
When inserting the current date, use the mysql CURDATE() function instead of PHP's date function. Use CURDATE() +0 to get YYYYMMDD instead of YYYY-MM-DD.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Mysql date format problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|