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




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.