I Want to display a value using formula field such it is a time ahead of created date.

I have another field called target field so I have to set the value of the formula field such that it equal to 50% of date/time between created date and target field.

Eg :
CreateDate : 7/2/2017 10:47 AM
TargetDate : 7/2/2017 10:51 PM

The formula field should return : 7/2/2017 10:49 PM

I have created the formula-

DATETIMEVALUE(CreatedDate + 0.5*(Target_Date_Time__c - CreatedDate))

but this formula is returning : 7/2/2017 4:49 PM

why is this happening?

I tried changing it to : DATETIMEVALUE(CreatedDate + 0.5*(Target_Date_Time__c - CreatedDate)+0.25) now it is returning the desired value

Can anyone explain why is it happening or any other formula to achieve this.

  • 2
    pay attention that 10:47 is AM and 10:51 is PM. I think that is a source of your misunderstood – Oleksandr Berehovskyi Jul 6 '17 at 9:52
  • @AlexanderBerehovskiy Thank you very much It was a mere overlook – david raj Jul 6 '17 at 9:54

Your Answer

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

Browse other questions tagged or ask your own question.