interval in days

From: Tomka Gergely <tomka(at)zeus(dot)gau(dot)hu>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: interval in days
Date: 2003-08-25 08:14:55
Message-ID: Pine.LNX.4.33.0308251012410.13781-100000@zeus.gau.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

date_part('epoch', date_trunc('day', TIMESTAMP 'now') -
date_trunc('day', hiba.datum)) / (60*60*24)

I hope there are a simple solution for this - i want to know the age of
hiba.datum, in days. If one year old, then i need 365.

--
Tomka Gergely
"S most - vajon barbárok nélkül mi lesz velünk?
Ők mégiscsak megoldás voltak valahogy..."

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-08-25 14:45:36 Re: interval in days
Previous Message Mike Castle 2003-08-25 03:39:25 Re: Clusters and pgsql