Postgresql: Age calculation to Ymd

PHOTO EMBED

Mon Aug 29 2022 19:56:27 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #sql

select 
  DATE_PART('year', AGE('2012-03-05', '2010-04-01')) AS years,
  DATE_PART('month', AGE('2012-03-05', '2010-04-01')) AS months,
  DATE_PART('day', AGE('2012-03-05', '2010-04-01')) AS days;
content_copyCOPY