Comparing Date to DateTime using UFT API
♥ 0 |
I’m trying to compare an expected date value to an API datetime field. I need to know how to use the UFT API Custom Expression to grab only the Date portion of the DateTime returned value. Or, is there another way that I can compare the two dates? Currently, when I pass in my expected date only value (because I don’t know the exact time), the T00:00:00.0000000 value is appended to the date passed in. So, I end up with an expected value = 2024-09-24T00:00:00.0000000. Of course, when I go to compare the expected value to the actual value (2024-09-24T01:31:27.0150000), the test fails because the times don’t match. I’m trying to see how I can get around this issue and compare only the date portions. Thanks
Marked as spam
|