I’m having a problem:
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 from that day to 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 count the HUGE difference in years. How can I solve this?