Saturday , March 2 2024

PostgreSQL Age Function

In today’s article, we will discuss the Age function in PostgreSQL, which calculates the difference in days, months, and years between two points in time.

The following illustrates the syntax of the AGE() function:

Let’s make an example;

In the example above, we specify today’s date with the “current_date” parameter and any date in the second parameter to find the day, month and year difference between those dates.

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories