Re: Date Problem

From: Stuart <sfbarbee(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Date Problem
Date: 2003-05-01 09:38:40
Message-ID: 200305010538.41212.sfbarbee@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ramesh,

If your field is a date field, you should be able to just do (From + 1),
(From +2)....

I know this works in 7.3.2 as in my example.. where published is a date field

select published,( published + 1), (published +2) from documents limit 10;
published | ?column? | ?column?
------------+------------+------------
2002-02-21 | 2002-02-22 | 2002-02-23
2002-02-26 | 2002-02-27 | 2002-02-28
2002-02-26 | 2002-02-27 | 2002-02-28
2002-02-25 | 2002-02-26 | 2002-02-27

Hope this helps.

Stuart

On Thursday 01 May 2003 02:36, Ramesh PAtel wrote:
> Hi All
>
> now Problem is
>
> I have to date From = '2003-04-01' and To='2003-05-12'
> now i want to use use date butween From and To.
> and each date one bye one use in query. so how to
>
> i increse date one bye one
>
> Please Help me.
>
> Ramesh Patel
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
"... the Zionist state of Israel has ignored many United Nations Security
Council Resolutions; possesses nuclear weapons and other weapons of mass
destruction; is currently engaged in a genocidal programme of mass killings
of Palestinians and that no attempt has been made by the United States or
Britain to disarm Israel or to stop its genocidal mass killings of
Palestinians" -- Result of Pan African Forum on Africans and the American
Imperialist War February 23, 2003

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ramesh PAtel 2003-05-01 11:30:30 date use in for loop
Previous Message Rajesh Kumar Mallah 2003-05-01 08:51:53 Re: Date Problem