Novari-QA
7 years agoFrequent Contributor
aqDateTime has AddDays and SubDays an interesting find
aqDateTime has two functions. When looking at the documentation for aqDateTime methods, we dont see SubDays, but yet this function exsists.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/methods.html
If i type in aqDateTime.SubDays("01/02/2017", 1) you would expect the result "01/01/2017" but that isn't the case.
It seems as if aqDateTime.SubDays acts exactly the same as aqDateTime.AddDays.
The result above will come out as "01/03/2017".
Very strange, i do not suggest using this feature as it does the same thing as add days when expected to do the opposite.
Yes i get that i can go AddDays (date, -1)
Just posting an interesting find