Today,s date in formula
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
you could wrap your datetimnetoday() in tostring
if isempty([date]) then "no case" else tostring(datetimetoday()) ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, great help!
