[thelist] Need some PHP Syntax help
Eduardo Kienetz
eduardok at gmail.com
Thu Apr 26 15:32:53 CDT 2007
On 4/26/07, Casey Crookston <caseyc at intellisoftmn.com> wrote:
> Hi,
>
> I am out of my element here, working on someone else's PHP project.
>
> Assuming that $OrderDate is the date and time an order was placed, we
> need to determine if right now is after or before 8:00 pm on the date
> the order was placed.
>
> If (strtotime("now") > strtotime(date("m/d/Y 8:00 pm",
> strtotime($OrderDate))))
>
> {
>
> // the current time is after 8:00 pm on the date of the order
>
> }
>
> Else
>
> {
>
> // the current time is before 8:00 pm on the date of the order
>
> }
How about:
Order date: 13 april 2007 at 03:05:50:
$orderdate = mktime(3,5,50,4,13,2007)
if(time()>$orderdate)
//current time is after
else
//current time is before
?
--
Eduardo Bacchi Kienetz
Linux sysadmin/Developer
http://www.noticiaslinux.com.br/eduardo/
More information about the thelist
mailing list