Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group