Here I need to calculate the difference of the two dates in the PostgreSQL
.
In SQL Server: Like we do in SQL Server
its much easier.
DATEDIFF(Day, MIN(joindate), MAX(joindate)) AS DateDifference;
My Try: I am trying using the following script:
(Max(joindate) - Min(joindate)) as DateDifference;
Question:
Is my method correct?
Is there any function in
PostgreSQL
to calculate this?