Re: Getting days after last login. Date problem
| From: | Andy | Date: | Wed, 13 Feb 2002 12:14:01 +0000 |
| Subject: | Re: Getting days after last login. Date problem | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16898@lists.php.net to get a copy of this message | ||
Thanx!
Andy
"* R&Ze:" <renze@datalink.nl> schrieb im Newsbeitrag
news:20020213125210.U10077@pro-pain.telemediair.nl...
> > Hi there,
> >
> > I would like to find out the changes on content after a members last
login.
> >
> > The format of the date stored in the member db is e.g.: Feb 13, 2002
> > The format of e.g pictures uploaded is:
> > 2000-02-13
> >
> > How can I search for pictures which are uploaded since the members last
> > login. Is ist possible to convert the memberdate format to the other one
and
> > just search for something like picturedate > logindate?
> >
> > Thanx for any help
> >
> > Andy
>
>
> strtotime is what you're looking for:
>
> strtotime ("2000-02-13");
> strtotime ("Feb 13, 2002");
>
> Then you can just 'say':
>
> if (strtotime ("2000-02-13") > strtotime ("Feb 13, 2002")) {
> print ("Picturedate after logindate");
> } else {
> print ("Logindate after picturedate");
> }
>
> Pretty easy huh!? PHP Rulz!
>
> --
>
> * R&zE: