I'm trying to calculate days between two dates.
Let's say I have the date '2005-05-25 06:04:08' and I want to count how many days are there between that day and the current date.
I tried doing:
SELECT DATE_PART('day', AGE(CURRENT_TIMESTAMP, '2005-05-25 06:04:08'::timestamp )) AS days; But for some reason this returns 11, it's not taking into account the difference in years. How can I solve this?