Problem comparing dates at midnight
Posted on 2014-12-29
I have two dates, both at midnight
e.g. 06/06/2014 and 12/29/2014
Both dates are exactly midnight (at least they should be), they are in datetime format and show no time section
I am using adddays to add 1 day each time in a loop until the
1st date = 2nd date
Problem is that even though on debug the dates eventually look equal, they are never equal and the loop continues.
I have also compared them in an if statement and they are not equal but they look the same.
Any help most welcome.