[thelist] Need some PHP Syntax help
Casey Crookston
caseyc at IntelliSoftmn.com
Thu Apr 26 16:57:42 CDT 2007
Ok, this is good. Thanks, Mark.
$OrderDate contains both date and time. It's from a datetime stamp in
MS SQL. An example is: "2007-04-26 10:31:00:00" So, adding 8 hours to
an assumed time of midnight won't work, unless we can first strip out
the time.
Thanks!!
Casey
-----Original Message-----
Syntax and semantics are muddled here.
Not sure if strtotime('now') works. just calling time() would do the
trick.
If $orderdata is in fact a *string* containing only a date string and no
time value then why not just use :
if (time() > (strtotime($Orderdate) + 20 * 60 * 60) )
(is the current time later than 20 hour past midnight on the order date
- 8 pm)
Or alternatively:
if (time() > strtotime($Orderdate . " 8:00 pm")
More information about the thelist
mailing list