function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChrisMcLChrisMcL 

Error Using ActivityDate field from the SalesForce Task Table

I am doing the following to get the amount of days between these 2 dates.  I get the error message below.  I am using the ActivityDate field from the Task table.  Also another note this field wasn't avaiable to be selected in the pull down in the formula generator, I had to go to Eclipse to get the field name.  The formula is returning a number.

IF(ISNULL({!ActivityDate}), NULL, (NOW() - {!CreatedDate}) - (TODAY() - {!ActivityDate}))
Error: Unsupported type Date/Time of referenced field ActivityDate

IMPORTANT NOTE:  If I inform the formula to return a date which this field happens to be and do the following I still get the same error message. 

{!ActivityDate}

IMPORTANT NOTE:  I do the same with my Permit Issued Date / created date on my Permit Object and it works perfectly.

IF( ISNULL({!Issued_Date__c}) , NULL, (NOW() - {!CreatedDate}) - (TODAY() - {!Issued_Date__c}))
Neil MessenbirdNeil Messenbird

The issue you have is around 'Date/time' versus 'date' only alone.

You can 'fudge' this by adding an extra field.
Select a DATE type and place the 'Date/time' field in the formula.
This effectively concerts the Date/Time to a date only

But.........it does cause some display issues in tab views.
The data is valid and can be used in reports.

ChrisMcLChrisMcL
Anyone have any ideas, to this issue.  I don't want to add another field to the table, since this is a customization to a non custom table.