timestamp question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

If you store the datetime as an INT (unixtime) you can still use the DATE_FORMAT function...

Code: Select all

SELECT DATE_FORMAT(FROM_UNIXTIME(datecolumn)), '%H %k %I %r %T %S %w') AS nicedate
FROM somecolumn
bruceg
Forum Contributor
Posts: 174
Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:

Post by bruceg »

I am getting closer. I played around in PHPadmin and now I am able to produce a timstamp like.

Last Update: 20060421173825

my question now is how to get that into a more human readable format.

thanks
Post Reply