Re: TIMESTAMP SUBTRACTION

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: TIMESTAMP SUBTRACTION
Date: 2003-05-21 12:25:03
Message-ID: 3ECBBD77.20173.629ECBB@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 21 May 2003 at 16:27, Madhavi Daroor wrote:
> I need to compare this difference with a numeric value in my WHERE clause
> like this
>
> WHERE
> TIMESTAMP('05-21-2003 00:00:00','mm-dd-yyyy') - TO_TIMESTAMP('04-30-2003
> 00:00:00','mm-dd-yyyy') > 30

Try
WHERE
(TIMESTAMP('05-21-2003 00:00:00','mm-dd-yyyy') - TO_TIMESTAMP('04-30-2003
00:00:00','mm-dd-yyyy'))::integer > 30

or something like that...

> Please reply SOON !!!

And why is that?

I am sure you would agree that it is not polite when you are asking for help.

Bye
Shridhar

--
lp1 on fire(One of the more obfuscated kernel messages)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Healy 2003-05-21 14:06:29 Re: TIMESTAMP SUBTRACTION
Previous Message John Schickling 2003-05-21 11:07:41 psql and ssl.