Wednesday, September 30, 2009 – Permalink –
When 28 is 30
How long is a month?
When you use the banker's DAYS360 function to calculate the number of days between two dates, you can get an odd answer.
If you use the DAYS360 function with a start date of February 28 and with an end date of March 28, a value of 28 days is returned.
You expect a value of 30 days to be returned for every full month. (12*30=360)
This behavior may occur if you use the U.S. method, also known as the NASD method, with the DAYS360 function.
To work around this behavior, use the European method with the DAYS360 function. With the European method starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the same month. To use the European method with the DAYS360 function, use the following syntax:
=DAYS360(cell number of start date,cell number of end date,TRUE)
Using FALSE or omitting the third parameter uses the U.S. method
An unexpected value with the DAYS360 function
See all Topics
<Doug Klippert@ 3:19 AM
Comments: Post a Comment