Re: date comparison again
| From: | Miguel Cruz | Date: | Thu, 09 May 2002 17:39:21 +0000 |
| Subject: | Re: date comparison again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96845@lists.php.net to get a copy of this message | ||
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