Jump to content

[SOLVED] Saving and displaying date php/mysql


acctman

Recommended Posts

Don't store a date in a varchar field. You won't be able to use the very powerful date functions in mysql. Use either a date or datetime field and store it as YYYY-MM-DD HH:MM:SS.

 

Use date() and strtotime() when you display the date/time. Or use MySQL to format the string.

 

Ken

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.