Tomka Gergely <tomka@zeus.gau.hu> writes:
> 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.
Cast both to type "date" and subtract.
regression=# select current_date - ('1999-08-25'::date);
?column?
----------
1461
(1 row)
regards, tom lane