I have been fighting this far too long. I am obviously clueless.
I have a table with the column day type bigint. I have written into this column the timestamp for Sept.25,2000. This shows as 969854400 - the number of seconds since Jan. 1, 1970. All ok so far.
I have included a script that does nothing but print out this date. The problem is it gives me Dec.31,1969. Obviously just before Unix time started? Can someone either push me in the right direction to fix this .... or just push me over a cliff. Either way I am out of my misery.
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en" "hmpro6.dtd">
<HEAD>
</HEAD>
<BODY >
<center>
<?php
$db = mysql_connect("localhost", "opencoun", "snjamd");
mysql_select_db("opencountry_com",$db);
$result = mysql_query("SELECT * FROM cheylinsports ORDER by day ASC",$db);
if ($myrow = mysql_fetch_array($result))
{
$day1=$myrow["day"];
$day2 = date ("M-d-Y", mktime (0,0,0,$day1));
do {
printf("$day2<BR>\n");
}
while ($myrow = mysql_fetch_array($result));
}
else
{
echo "Sorry, no records were found!";
}
?>
</center>
</BODY>
Thanks in advance.
stujo