Jump to content

[SOLVED] timestamp


tom_b

Recommended Posts

I've experienced similar problems when I started with this as I was playing with a MySQL datatype of DATETIME and using date() to change the format gave me some weird results.

 

This is what I ended up using in the end:

echo date("d-m \a\\t H:i",strtotime($fetch[dt]));

If you want only the date and time then remove \a\\t as that only displays the "at" word between the two.

 

The link AndyB posted is very helpful so you can customise the output format.

Link to comment
https://forums.phpfreaks.com/topic/38081-solved-timestamp/#findComment-182440
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.