note 40559 added to function.date

From: Date: Sun, 07 Mar 2004 23:15:44 +0000
Subject: note 40559 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-66411@lists.php.net to get a copy of this message
The easiest way to find a time recentry passed, such as seconds or hours seems to be to use time() and then subtract the amount of seconds you want, and then turn it in to a date format. Example: $now = time(); $anhourago = $now - 3600; $anhourago_date = $date = date("Y-m-d H:i:s",$anhourago); ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40559 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40559&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40559&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66411) next »