1

I have Pin field which is a formula field and PIN should be DDMM part of DOB of customer.

I have written a foll formula and it gives error

DAY( Customer_id__r.Date_of_Birth__c )  & MONTH(Customer_id__r.Date_of_Birth__c)

and the error is

Incorrect parameter type for operator '&'. Expected Text, received Number (Related field: Formula)

Can some one help pls

2 Answers 2

2

The & concatenation operator expects the left operand and right operand to be text. But DAY(Customer_id__r.Date_of_Birth__c) returns integer and so throws syntax error.

You can surround the DAY and MONTH functions with TEXT() function like

TEXT(DAY(Customer_id__r.Date_of_Birth__c)) & TEXT(MONTH(Customer_id__r.Date_of_Birth__c))

Hope it helps.

2

You should use like this

text(day(Customer_id__r.Date_of_Birth__c)) +'&' + text(month(Customer_id__r.Date_of_Birth__c))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .