Re: using date as an "id" field...
| From: | Hidulf | Date: | Tue, 09 Oct 2001 15:25:53 +0000 |
| Subject: | Re: using date as an "id" field... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70498@lists.php.net to get a copy of this message | ||
try this one
date("Y-m-d",time()-24*3600);
--
Hidulf
http://www.hidulf.com
"Sc" <sven@gstar.com.au> wrote in message
news:20011009024925.7474.qmail@pb1.pair.com...
> Thanks for the response but it doesn't seem to work for me...
> This is todays date reference: 2001-10-09
> And this is meant to be the previous entry in the sql database:
> 1999-11-29
>
>
> In article <20011008101141.59851.qmail@pb1.pair.com>, "Piotr Martyniak"
> <martynia@box43.gnet.pl> wrote:
>
> > use:
> > ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $your_data, $numbers);
> > $day_before = mktime(0, 0, 0, $numbers[2], $numbers[3], $numbers[1]) -
> > 24
> > * 3600;
> > $new_date = date("Y/n/j", $day_before);
> > should work natur
> >
> >