Jump to content

Help with timestamp


Padgoi

Recommended Posts

I'm trying to pull a date from my mysql database.  I'm pulling the info correctly but it's showing as a timestamp (string of numbers).  How do I get it to display in the correct date format?

 

Here's the snippet:

 

	echo "<font color='blue'>The last topic posted in is</font><a href='".$INFO['board_url']."/index.php?showtopic=".$lastpost[1]."&view=findpost&p=".$lastpost[0]."'><font color='red'>".$topics[0]."</font></a><font color='blue'>by</font><a href='".$INFO['board_url']."/index.php?showuser=".$lastpost[3]."'><font color='red'>".$lastpost[2]."</font></a><font color='blue'>in</font><a href='".$INFO['board_url']."/index.php?showtopic=".$lastpost[1]."&view=findpost&p=".$lastpost[0]."'><font color='red'>".$z[0]."</font></a>at <font color='red'>".$lastpost[4]."</font>";

 

The very last part ".$lastpost[4]." is the timestamp portion.  How do I get that to show correctly?

 

The query that is pulling the data from the dbase is:

 

		$q = "SELECT pid, topic_id, LEFT(author_name, 15), author_id, post_date from ibf_posts order by pid desc limit 1";

 

where post_date is the timestamp.

 

Any help would be greatly appreciated!

Link to comment
https://forums.phpfreaks.com/topic/198790-help-with-timestamp/
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.