I have a form input that accepts a date and inserts it into a MySQL database. The current format is YYYY, MM-DD. This is the format that I require on one of the forms that allows the user to input a date range for a custom report. I'm going to replace the manual input with a graphical calendar using jquery but it's been requested that I change the date formate to MM/DD/YYYY.
In a nut shell, how can I convert MM/DD/YYYY to YYYY, MM-DD so the database will recognize it?
Looks about right, did you try it? Also, why not just use the ISO date format as your database table column definition? It would be an easy adjustment right away and you can then use all kinds of date features during SELECT queries. It will make your life much easier I would think!