Jump to content

formatting date from mysql db


squiblo

Recommended Posts

You should look into  strtotime and date.

 

Alternatively, if you know the format is always the same, you can just use explode to re-construct the string.

 

EDIT:

Well I just read the title, if you are pulling it from a MySQL DB, look into MySQL Date and Time Functions as you can pull it out how you want it in the query instead of using up PHP's processing time to do it for you.

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.