Re: date comparison again

From: Date: Thu, 09 May 2002 17:25:20 +0000
Subject: Re: date comparison again
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96846@lists.php.net to get a copy of this message
Thank you Miguel! I was missing the /86400 and it works much better now :) On Thu, 9 May 2002, Miguel Cruz wrote: > On Wed, 8 May 2002, Scott St. John wrote: > > Sorry to be so thick this morning, but I have a unix time stamp in my MS > > Sql server that is the date, plus 60 days to expire a password. I want to > > take today's date and compare to the two to see: > > 1)How many days until the password expires > > 2)If the password already expired then force a password change. > > > > I am missing something I am sure because I am not getting the answer I am > > looking for with this code: > > > > $expirePass = strtotime("now"); <-todays date > > $myPassword = ("1026047985"); <-from the MS Sql field > > > > $itexpires = ($expirePass - $myPassword); > > $daysleft = intval(($mypassword - now()) / 86400)); > > miguel > --

« previous php.general (#96846) next »