3

I have an issue. I have a text field to store survey completion date and time. I created a formula field to capture date only.

DATEVALUE( completion_time__c)

It is showing correct date on Page layout but when I drag this field into report. It is showing Error.

Please help me to figure out the issue.

enter image description here

enter image description here

6
  • Please specify what error you get Commented Jun 15, 2016 at 7:52
  • Did you check every record about the Completion_time__c? I mean to say, Is the Format that you have given in completion_time__c is correct in all the records?
    – Subhash
    Commented Jun 15, 2016 at 7:55
  • Do all the records that appear in the report have the correct date on the page layout? I'm thinking maybe 1 wrong-formatted record breaks the whole report column.. What if you filter the report to only show records of which you're sure they are correct? Commented Jun 15, 2016 at 7:55
  • I have checked and all have a valid completion date time. Survey created date is also capture correct date. Commented Jun 15, 2016 at 8:10
  • Can you post your formula too, i think the error lies there! Commented Jun 15, 2016 at 8:31

3 Answers 3

2

I used this formula and it worked.

DATE(
VALUE(LEFT(Completion_Time__c,4)), 
VALUE(MID(Completion_Time__c,6,2)), 
VALUE(MID(Completion_Time__c,9,2))
)
2
  • This is the answer. I used this formula and it's working fine. Commented Jun 15, 2016 at 12:47
  • Please mark it as the answer
    – o-lexi
    Commented Jun 15, 2016 at 15:54
0

According salesforce developer forum (which is chosen best answer from admin and solved question), that guy has the same issue with yours.

https://developer.salesforce.com/forums/?id=906F00000008xCaIAI

My guess is that it is showing error because your converting date to text, again creating DateValue from text, report is not able to compile it. Just guessing...

0

If your Completion Date is DateTime, then you have to use DateValue(CustomFieldDate__c) in your formula field.

If it is text field, use VALUE().

This error occurs because of the dataType mismatch only.

2
  • No, The problem is Completion Date is Text data type. @sfdcFanBoy Commented Jun 15, 2016 at 8:55
  • Oh I didnt know it is text field. Yes if it is text field, need to use VALUE() Commented Jun 15, 2016 at 14:57

You must log in to answer this question.

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