As you can see I am comparing the minimum of the date field (27 july 2015) with a date calculation which gives a date that is the same. But the if statement says they are not equal!
Please help. Am I just going mad?
I've just worked it out!
Weekend returns a time element. weekend is the last millisecond of the week. So I needed a floor function to get just the date and ignore the time!