I am struggling with usage of datetimetoday() function in formula. I have a column name 'case create'- i need to replace all the dates with today's date and blanks with a string " No case" in that column. I keep getting error that says Unmatched or parse.
please help!
Solved! Go to Solution.
you could wrap your datetimnetoday() in tostring
if isempty([date]) then "no case" else tostring(datetimetoday()) ENDIF
Hi @jeetamar11
If you want one column with today's date or 'No case' then the column will need to be a string, whereas DateTimeToday is going to return a date. I think wrapping it in ToString() as part of your formula should work.
Column name needs to be same as it is. i just need to replace the data that has today's date, with a string "No case". The data in the column is datetime type
You cannot store "No case" in a column that is a Date data type - it will have to be a String data type in that scenario.
You won't be able to keep the datetime data type if you want a string value of 'No Case'. You will need to create a new string column and rename it to the same name later
if you'd like to display 'No Case' the data type needs to be a string, which means no date functions downstream in the workflow. To replace all the dates with today's date and blanks to 'No Case' the formula tool would look something like the screenshot
Thank you, great help!