Convert PHP date() and time into MySQL Date Time Field
Jon Moffet
Here's a quick way to convert php date() into a format acceptable to be stored in MySQL database 'Date Time' field
If you want to store the time in MySQL 'Date' field then you can use this code
you can later insert $date into MySQL "Date" or "Date Time" field to be manipulated by the database later.
Example of MySQL 'Date' value :
- 2007-03-11 18:52:42
- 2007-03-11
Posted in Uncategorized |







