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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.