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

  • Please specify what error you get – Anurag Bhardwaj Jun 15 '16 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 Jun 15 '16 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? – Guy Clairbois Jun 15 '16 at 7:55
  • I have checked and all have a valid completion date time. Survey created date is also capture correct date. – Russel baker 1 Jun 15 '16 at 8:10
  • Can you post your formula too, i think the error lies there! – sfdcFanBoy Jun 15 '16 at 8:31
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))
)
  • This is the answer. I used this formula and it's working fine. – Russel baker 1 Jun 15 '16 at 12:47
  • Please mark it as the answer – o-lexi Jun 15 '16 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.

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.