0

Looking to create a formula field that will pull 4 different dates from 4 different fields and display in one field. I put the code below, but I'm getting an error. How can I fix it?

Error:

Error: Incorrect parameter type for operator '&'. Expected Text, received Date

Code:

Date_1__c & ", " & Date_2__c & ", " & Date_3__c & ", " & Date_4__c
  • What is the field data type you are using for formula field? – SFDC Mafia - VIC Nov 10 '17 at 7:10
0

You have to convert them to text first, as dates are not naturally a "text" type, which is why we're allowed to do math with dates. Using the TEXT formla should give the desired result:

TEXT(Date_1__c) & ", " & 
TEXT(Date_2__c) & ", " & 
TEXT(Date_3__c) & ", " & 
TEXT(Date_4__c)
0

You can also use + to concat the Dates, But first you need to take Dates into Text function :

TEXT(Date_1__c) + ", " + TEXT(Date_2__c) + ", " + TEXT(Date_3__c) + ", " + TEXT(Date_4__c)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy