GreaterThanOrEqual to on Dates no longer working
Hi there,
since upgrading to 14.61 this week my tests are failing on comparison of a date time.
I have a timestamp set as:
var timestamp = dotNET["System"]["DateTime"]["Now"]["UtcNow"]["OleValue"];
this is then compared to a value extracted from a grid:
aqObject.CheckProperty(Grid.DataSource.DataSource.Item(RowId).Row, "StartedOn", cmpGreaterOrEqual, timestamp);
last week this worked absolutely fine, however today I get:
As you can see it is equal to, not less than, and I am using greater or equal as my qualifier!!
Help, please?!
Hello all,
so yes, some back and forth with support on this, some of it down to my specific application, some down to my own understanding. In short, DateTimes are very clever but quite complex.
The issue stems from the line:
dotNET["System"]["DateTime"]["Now"]["UtcNow"]["OleValue"];
Where this is a FULL timestamp, down the beyond the seconds level...
However, the one in my grid I am comparing against only goes to the seconds, and therefore I'm in a situation where:
Timestamp = 12:05:55:xxxx
Grid = 12:05:55 without the .xxxx
And therefore it likely assumes .0000 which is, therefore, LESS THAN xxxx and not greater or equal.
So when timestamp values appear to be "equal to" in a UI sense they are not, as underneath one has a deeper level of accuracy!
What's more frustrating for me is when they appear "equal" it's a reflection of great performance on my tested application, usually there is a good second or 2 between the dates, so my update of TC was irrelevant, my apps were just running better last week!