Re:

From: "Jordan S(dot) Jones" <jordanj(at)racistnames(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: apratim sharma <hiapra(at)yahoo(dot)com>
Subject: Re:
Date: 2003-04-13 11:01:27
Message-ID: 3E994387.4060808@racistnames.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

To increment days:

SELECT cast(now() + interval '10 day' as date);

Otherwise I suggest you take a look at
http://www.postgresql.com/docs/view.php?version=7.3&idoc=1&file=functions-datetime.html

apratim sharma wrote:

> hi,
>
> Can anybody tell how to add an integer to a date inside postgres query.
>
> i'm using postgres 7.3
>
> when i give select cast(now() as date) it gives the current date,
> now i want to select a date say after 10 days.
> i'm giving select cast(now() as date) +10 ; it gives error can't
> typecast date to int
>
> what to do???
>
> please help me
>
> Apratim
>
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center
> <http://us.rd.yahoo.com/finance/mailsig/*http://tax.yahoo.com> - File
> online, calculators, forms, and more

In response to

  • at 2003-04-13 06:19:47 from apratim sharma

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nic Ferrier 2003-04-13 11:36:17 Re: patch for cursor based querys in JDBC
Previous Message apratim sharma 2003-04-13 06:19:47