You need to sign in to do that
Don't have an account?

Workflow rule criteria to find difference between data-time fields.
Hi,
Please help in finding out the difference between two date and time fields.
Scenario:
I have to send an email notification if the case created date is greater than 4 hours.
So I written the rule criteria as NOW() - Date_Time_Opened>4.
But the workflow fails(it is not sending any email notification).
I also tried with Case escalation rule.,it is also not working.
Please help a better approach.
Thanks,
You can create a time based workflow that will fire 4 hours after the record is created.
You can extract hours from datatime field :
Datetime dtm = system.now;
Integer in = dtm.hour();
Tryout your workflow by getting the hours of datetime field and use the condition as per the requirements. Refer Force.com Apex developer's guide for datetime methods.
Hope this helps.
Hi Pradeep,
Thanks for your reply.
I think the below mentioned solution is not possible directly with Workflow I have to create formula field and then I have to use it in my workflow.
And also I have a doubt that my time based workflow I have to send email to different peoples with 10 min and 20 min gap.
I think time based minimum time starts with 30 minutes there a way to achieve this?
Thanks,
Indy