note 94012 modified in book.datetime by danbrown

From: Date: Wed, 14 Oct 2009 04:15:54 +0000
Subject: note 94012 modified in book.datetime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161718@lists.php.net to get a copy of this message
We can also get the submitted datetime (e.g. 2009-11-06 07:03:41) using the following: <?php $DateOfRequest = date("Y-m-d H:i:s", strtotime($_REQUEST["DateOfRequest"])); ?> Or another good example of getting DateTime: <?php $DateOfRequest = date("Y-m-d H:i:s", mktime($_REQUEST["Hour"],$_REQUEST["Min"],$_REQUEST ["Sec"],$_REQUEST["Month"],$_REQUEST["Day"],$_REQUEST["Year"])); ?> --was-- We can also get the submitted datetime (e.g. 2009-11-06 07:03:41) using the following: <?php $DateOfRequest = date("Y-m-d H:i:s", strtotime($_REQUEST["DateOfRequest"])); ?> http://php.net/manual/en/book.datetime.php

« previous php.notes (#161718) next »