I don't get it I want to calculate something I want to check if the time out of the database is before or after this time so I made this.
$qVraagCodeOp = "SELECT * FROM `code` WHERE `Code_Code` = '$value'";
$rVraagCodeOp = mysql_query($qVraagCodeOp);
$aVraagCodeOp = mysql_fetch_assoc($rVraagCodeOp);
$oldTime = mktime($aVraagCodeOp["Code_Expdate"]);
$nowTime = time();
echo "databaseTime = $aVraagCodeOp[Code_Expdate] <br />";
echo "mktime =" . $oldTime . "<br />";
echo "timestamp now = $nowTime <br />";
echo 'today: '. date('Y-m-d', $nowTime ) ."<br />";
echo "new minus old =" . ($nowTime - $oldTime);
because the database sais the date is somewhere in 2008 and now its 2009 the substract should be positive however....
this is the output
databaseTime = 2008-12-01
mktime =1263136596
timestamp now = 1255907796
today: 2009-10-19
new minus old =-7228800
does anyone get this am i just doing something wrong?
thanks Matthy