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
1
  • What is the field data type you are using for formula field?
    – Vickal
    Commented Nov 10, 2017 at 7:10

2 Answers 2

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)

You must log in to answer this question.