Resolution :The third parameter in the DATEDIF function is WD which means "
Weekdays".
Weekday (WD) : With the weekday unit, DATEDIF does not count Saturday or Sunday when calculating days. This means that the difference between Friday and Monday is one day.
DATEDIF function :The DATEDIF function returns the difference between two full component standard dates in units of a specified component.
Syntax: How to Find the Difference Between Two Dates
DATEDIF(from_date, to_date, 'component')
from_date : Is the start date from which to calculate the difference. It is a full component date.
to_date Date : Is the end date from which to calculate the difference.
Component can be any one of the following:
Alphanumeric : (Is one of the following enclosed in single quotation marks: )
Y indicates a year unit.
M indicates a month unit.
D indicates a day unit.
WD indicates a weekday unit.
BD indicates a business day unit.
In our example -
- 'RT_LOAN_ENTRY_DATE' is the start date
- TODAY1 is the end date
- The function 'WD' calculates the difference in weekdays