Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
the below two functions returns the same date if I use today()
=YearEnd(today(),0,-10)
returns: 31/01/2014
=YearEnd(today(),0,2)
returns: 31/01/2014
what's the difference ?
Thanks,
Naresh
The third parameter of YearEnd() is "first month of year".
So when you have 2, 2=February since your second parameter ("shift") is zero.
And when you have -10, 12-10=2=February as well, since, once again, your second parameter ("shift") is zero.
Thanks for your response.
but, instead of using today() function if pass valid date.
Ex: =YearEnd('01/02/2000',0,-10)
result: 31/01/2000
YearEnd('01/02/2000',0,2)
result: 31/01/2001
why these are showing different results?
anyone??
For YearEnd('01/02/2000',0,-10), it shows the end of the previous year (because the 10 is negative). Since you say the new year starts in February, the end of the previous year would be 31/01/2000 (because 01/02/2000 is the first day of the new/"current" year).
For YearEnd('01/02/2000',0,2), it shows the end of the "current" year (because the 2 is positive). Since you say the new year starts in February, the end of the current year would be 31/01/2001 (because 01/02/2000 is the first day of the new/"current" year).