Re: using date as an "id" field...
| From: | sc | Date: | Tue, 09 Oct 2001 02:53:53 +0000 |
| Subject: | Re: using date as an "id" field... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70412@lists.php.net to get a copy of this message | ||
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
>
>