Re: Retrieve Future Timestamp Values

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Retrieve Future Timestamp Values
Date: 2011-10-07 08:56:55
Message-ID: 4E8EBED7.5060107@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/10/2011 08:13, Adarsh Sharma wrote:
> Dear all ,
>
> I have these timestamp values in one table in a database.
> I need to fetch those rows are greater than the current time, fore.g
> today is Friday and i need rows of sunday, monday and so on .
>
> column A Column B
> "2011-10-07 09:32:51+05:30";"2011-10-07 11:30:51+05:30"
> "2011-10-08 05:32:51+05:30";"2011-10-08 11:50:51+05:30"
> "2011-10-08 05:32:51+05:30";"2011-10-08 11:50:51+05:30"
> "2011-10-08 15:32:51+05:30";"2011-10-08 18:50:51+05:30"
> "2011-10-11 08:32:51+05:30";"2011-10-08 10:50:51+05:30"
> "2011-10-11 12:32:51+05:30";"2011-10-11 04:50:51+05:30"
> "2011-10-09 12:32:51+05:30";"2011-10-11 13:50:51+05:30"
> "2011-10-13 12:32:51+05:30";"2011-10-13 13:50:51+05:30"
> "2011-10-15 12:32:51+05:30";"2011-10-15 13:50:51+05:30"
> "2011-10-25 12:32:51+05:30";"2011-10-26 13:50:51+05:30"
>
> I want that rows whose value is in future data and time.
>
> Please let me know how to query on comparing timestamp values to
> retrieve rows of future date

Easy! -

select .... where my_column > current_timestamp;

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank Lanitz 2011-10-07 09:26:46 Standby server witching into master role after import failure
Previous Message tushar nehete 2011-10-07 08:00:33 Re: How to create database link and synonym in postgresql 9.0