I'm trying to remove the subtract symble from a formula field. This formula field is based on a two fields. one is date field value anthoer one is Text filed value. Is that a possibility?

My scenario:

TEXT((TODAY() - (DATEVALUE(CreatedDate)- VALUE(Daysonrecord__c))))

Daysonrecord__c=19 ==>  (10-(6-19))=(10-(-13))=23

Actuvally Excpecting answer is (10-(6-19)) = (10-(-13)) = 3.

how to remove substract symbol before '-13'. How can i achieve my expected answer 3.

1 Answer 1


You need to use the ABS function in the formula. This will return the absolute value for you.

So, something like this should work for you.

ABS(TEXT(ABS(TODAY() - ABS(DATEVALUE(CreatedDate)- ABS(VALUE(Daysonrecord__c))))))

Note: This is just a pseudo code. You need to try it out.

  • @Hemanth Jain, Not working above Formula Field. I got this ERROR " Custom Field Definition Edit Error: Invalid Data. Review all error messages below to correct your data. Incorrect parameter type for function 'ABS()'. Expected Number, received Date (Related field: Formula) " Oct 10, 2017 at 10:15
  • ABS accepts only number parameter, so you will have to convert the number into date first. Oct 10, 2017 at 10:19
  • @Hemanth Jain, I am also getting same error.
    – Preeth
    Oct 10, 2017 at 10:19
  • @Hemanth Jain, I dinn get you. How to convert the number into date Oct 10, 2017 at 10:33
  • You can convert the Date to number using the 'DAY' function like, DAY(DATEVALUE(CreatedDate)) and DAY(TODAY()) Oct 10, 2017 at 10:35

You must log in to answer this question.

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