PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Date Subtraction
hi,
hey you are bang on target. It did solve my problem.
Thanks a lot,
Manoj
On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote :
>
>if you really just want yesterday, i use date("Y-m-d", time() -
hi,
hey you are bang on target. It did solve my problem.
Thanks a lot,
Manoj
On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote :
>
>if you really just want yesterday, i use date("Y-m-d", time() -
86400);
>
>that way you'll get the correct info, no matter if it spans
>weeks,
months,
>years etc
Oh, in MySQL, there's also DATE_SUB(). Forgot to mention that one.
Rich
-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 2:40 PM
To: 'Manoj Japher'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Date Subtraction
Manoj,
J
On Thursday 22 August 2002 02:23, Manoj Japher wrote:
> hi,
> Is there any way I can get previous day's date, like we get
> current
> date by using getdate() or date() function. I mean is there some
> in-built function in PHP which can subtract date to give me
> yesterday's date.
> I am curren
Manoj,
Just a couple of thoughts:
First, I know this particular topic has been discussed here recently, so you
might want to search the archives for more exhaustive information.
Second, if you're using MySQL, check out the functions DATE_ADD() and MOD().
They're MySQL functions, so you'll have t