FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


TIMESTAMP display format help





sathiyasri
Hello everybody,

I dont know where and how to change the TIMESTAMP format to display in PHP. Below you will find the feild name $stamp that represents the TIMESTAMP in MySQL.

I have searched for some basic help on this but it was to advanced for me. Can someone help with this? Does the code go into the PHP or the HTML body?

Thanks!
hexkid
I'd do it on the PHP side
Code:
<?php
$format = 'Y-m-d H:i:s';
$sql = "select ... UNIX_TIMESTAMP(column) as whatever ...";
// query
// fetch into $row
echo date($format, $row['whatever']);
?>
Related topics
my website won't display... problem with index.php
Questions about best image formatting...
Keyboards Shortcuts
Java applet error.
jython for web applets
Need help to display Yahoo Online Status Indicator on site
Help setting a css for the sidebar : Blog
Please Help: Firmware Upgrade for MP3 Player needed
Help needed: Video Compression for MP3 player
Help Needed - URL format
help with login to display the current username
Display Previous and Next buttons not working
Help with neat Image Display Code
Need Help Moving Vertical Display Horizontal
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.