Jump to content

retrieving date/time from database


Recommended Posts

I have my database set to insert the current time stamp when an entry is made into the table, I am then trying to retrieve via the following code:


$select_view_idea="SELECT * FROM $tbl_name5 WHERE message_number='$message_number'";
$date=date('l, F jS Y h:i:s A T', $date);
echo $date;


The above is outputting:

Wednesday, December 31st 1969 07:33:31 PM EST


the database contains:

2011-11-18 00:47:56

Link to comment
Share on other sites


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.