This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hello! I am trying to create this formula:
IF [YEAR] = "2019" THEN [DATE] + 365 ELSE [DATE] ENDIF
but it gives me malformed if statement or invalid type in operator error. Please help?
To add days to a date (or datetime) you need to use the DateTimeAdd function.
Additionally if [YEAR] is a number type (not a text field) then you need to not have the quotes as it will complain that types don't match
IF [YEAR] = 2019 THEN DateTimeAdd([DATE], 365, "days") ELSE [DATE] ENDIF
should get what you need