This one is killing me!
I'm trying to compare two dates with the following code:
Cell R2 gets it's value from an earlier function:
The issue I am having is that although I format the dates to "dd mmmm", it appears that the default of the date within excel in the Now() command is in US format "mm dd yyyy".
What I am finding is that when I compare a date with a "dd" value of 12 or less, it interprets that in the "mm dd yyyy" format. If the "dd" value is greater than 12, it interprets it in the "dd mm yyyy" format.
The result is when I compare values as now, where yesterday was 07-11-2013 (Cell R2) & today is 08-11-2013 (dateCompare var) my code fails and tells me that dateCompare is NOT a later date than Cell R2.
This is absolutely doing my head in as I'm right at the end of a massive project, and this is stopping it from being completed!
Bookmarks