Skip to main content

Hi,


I have a table where I have calculated dates using a formula so many days from another field. This is an if statement because there are different situations. I have used the datetime format so it is a date.


IF({Campaign Class}=‘Minor’,DATETIME_FORMAT(DATEADD( {Execution Start},-98,‘Days’), ‘DD/MM/YY’),IF({Campaign Class}=‘Small’,DATETIME_FORMAT(DATEADD( {Execution Start},-154,‘Days’), ‘DD/MM/YY’),IF({Campaign Class}=‘Medium’,DATETIME_FORMAT(DATEADD( {Execution Start},-210,‘Days’), ‘DD/MM/YY’),IF({Campaign Class}=‘Large’,DATETIME_FORMAT(DATEADD( {Execution Start},-238,‘Days’), ‘DD/MM/YY’),“TBA”))))


Issue us when I try and use this date to populate a gannt chart it says it is not recognizing this as a date.


Any ideas.


Thanks, Mark

The Gantt charge needs to have date objects. When you use DATETIME_FORMAT you have a date string.


Try removing DATETIME_FORMAT from your formula. You will also need to remove the "TBA" string at the end of your IF. When any portion of an IF function could return a string, the entire formula is considered to be a string.


Reply