Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Could anyone explain the below 2 scenarions of inmonths function.I dont understand y we are getting false in one expression and true in other expression.
inmonths ( 4, '2006-01-25', '2006-03-01', 0, 3 ) returns false
inmonths ( 4, '2006-04-25', '2006-03-01', 0, 3 ) returns true
Thanks in advance
Hi,
here we will check if the 2006-01-25 lies in a 4 month period i.e
2006-03-01 to 2006-07-01
but here the first month of of year is March due to 3..
that is why you first expression is false and second one is true
Hope you understood..
Sushil
I agree, but why
inmonths ( 4, '2006-01-25', '2006-01-01', -1 ) returns false?
2006-01-01 with a shift of -1 and a period of 4 months contains 2006-01-25.