Jump to content

change format


Alicia

Recommended Posts

The best thing to do is change the format to MySQL DATE format (yyyy-mm-dd) then you can take advantage of the dozens of built-in datetime functions and it also allows you to compare and sort the dates correctly. Store dates for functionality in the DB, not for prettiness.

 

Add a date column, type DATE and run an UPDATE query using mysql's STR_TO_DATE function to convert from your format.

Link to comment
https://forums.phpfreaks.com/topic/272704-change-format/#findComment-1403279
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.