Wondering if the DateTimeAdd function has a bug. Consider the following:
DATE_X = '2017-12-08' converted to date using DateTimeParse([DATE_X],"%y-%m-%d")
DATE_Y = '2017-12-15' converted to date using DateTimeParse([DATE_Y],"%y-%m-%d")
My test is whether DATE_Y less than 7 days from DATE_X. Logically, the answer should be 'No' since DATE_Y is exactly seven days after DATE_X.
If however I use a formula below, the answer is Yes:
IF [DATE_Y]< DateTimeAdd([DATE_X], 7,'days') THEN 'Yes'
ELSE 'No'
ENDIF
If I create a variable and set the formula to that variable, I get the expected 'No':
[DATE_Z] = DateTimeAdd([DATE_X], 7,'days')
IF [DATE_Y]< [DATE_Z] THEN 'Yes'
ELSE 'No'
ENDIF