DATE Arithmetic Difference between the dates
For Complete YouTube Video: Click Here
In this class, we will understand the DATE Arithmetic Difference between the dates.
We have already discussed some concepts on date functions.
Table of Contents
DATE Arithmetic Difference between the dates
In SQL, we can find the difference between the dates.
What is the use of finding the difference between the dates?
If we find the difference between the dates, we will get the number of days.
For example, we have two dates, 16-JAN-2021 and 13-JAN-2021, we will get three days as the output.
Example on Date Difference
To understand this, we will consider the table below.
In the above table, we have the festival details with the start date and end date.
If we want to get the number of holidays, we have to find the difference between the start and end dates.
The query and the output of the ‘query’ are as shown below.
To understand more about the date difference, we will find the age of the employees.
The query and the output of the ‘query’ are as shown below.