You need to sign in to do that
Don't have an account?
Steve Cairney
Show MIN between two Datetime fields
Hi I have a datetime field called 'Last Contact'
This field shows the latest datetime from two other fields. Here's the code
It works fine, but if one of the fields is blank, the resulting field is blank.
How can I edit the formula above to post the datetime value from the filed that has a value out of the two?
This field shows the latest datetime from two other fields. Here's the code
NOW()- MIN( NOW()- MMERP__LastDatetimeSent__c , NOW()- Last_Call_Made__c )
It works fine, but if one of the fields is blank, the resulting field is blank.
How can I edit the formula above to post the datetime value from the filed that has a value out of the two?
I think either of the code will work.(I have not tested)
Let me know if this helps you.
Thanks and Regards
Sandhya
Since DateTime is also datatype, you could probably use DateTime instead of Date.
Thanks and Regards
Sandhya
I said DATETIME not DATEVALUE.
Please see below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_datetime.htm
Thanks and Regards
Sandhya
You are correct; DATETIME is not a variable in the formula.
I have worked around it and got below solution.It is working for me.
Please check and let me know if you have any more issues with this.
Thanks and Regards
Sandhya