date time function

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: date time function
Date: 2007-06-28 20:04:48
Message-ID: a47902760706281304x1333ee7cnf5fbf01eadbd447a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a timestamp field in my talbe.
I need to check its difference in days with the current date.

field name is time_stamp and I did it as follows:

select age(timestamp '2000-06-28 15:39:47.272045')

it gives me something like

6 years 11 mons 29 days 08:20:12.727955

How can i convert this result into absolute number of days.

thanks,

~Jas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2007-06-28 20:13:44 Re: date time function
Previous Message Raymond O'Donnell 2007-06-28 18:43:23 Re: [GENERAL] i need a rad/ide open source for work with postgresql