Jump to content

Formatting the funky date in a MySQL table read


jeffery1493

Recommended Posts

Hi All,

I'm sure this sounds like a dumb question, but I have been struggling with trying to format an incoming date, from a PHP MySQL table read.


The date data from the table was put in this engenius format (example):

1167686619


My code is pulling rows from an inner join:

      while ($row = mysql_fetch_array($result))
      {
            echo "<TR>";

            echo "<TD align='center' width='10%'> ", $row['0']," </TD><TD width='10%'> ", $row['1']," </TD><TD width='10%'> ", $row['2']," </TD><TD width='10%' align='center'> $", $row['4'],".00 </TD><TD align='center' width='10%'> ", $row['5']," </TD>";
            echo "</TR>";
      }


$row['5'] is the date, coming through as 1167686619.  I've visited dozens of webpages, and tried at least ten differnet functions and combinations, but none that say how to format it in this context.
I'm sure this is something simple I just can't see.................




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.