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

Time spent ??
Hi All,
I am trying to calculate the time spent on each staff. I have taken 2 datetime fields and 3rd field to calulate time spent for each staff.
What I am trying to do is : When record is getting created that time,status is 'NEW' and setting the 1st field to NOW(). Now on staff change and status not equals to 'NEW', updating fields i.e the 2nd datetime field to NOW(),Then calulating the timespent: 2nd datetime - 1st datetime and again
setting the 1st datetime field to NOW().
But the problem is while updating 3 fields at a time. The 2nd datetime field should be updated at the last but it is updating before calculating the time spent.
So, how to proceed with it. Please suggest for the same.
Thanks!
I am trying to calculate the time spent on each staff. I have taken 2 datetime fields and 3rd field to calulate time spent for each staff.
What I am trying to do is : When record is getting created that time,status is 'NEW' and setting the 1st field to NOW(). Now on staff change and status not equals to 'NEW', updating fields i.e the 2nd datetime field to NOW(),Then calulating the timespent: 2nd datetime - 1st datetime and again
setting the 1st datetime field to NOW().
But the problem is while updating 3 fields at a time. The 2nd datetime field should be updated at the last but it is updating before calculating the time spent.
So, how to proceed with it. Please suggest for the same.
Thanks!
Are you doing this with trigger or workflow ?
I am trying it using workflow. Please suggest for the same.
As per your update, how to proceed with formula field.
Actually, what is happening is as I have updating 3 fields in 2nd workflow rule. The 1st datetime which I am updating after time spent field, that 1st datetime field is getting updated before the calculation of time spent.
So, please suggest for the same.
Thanks!
IF(OR(ISBLANK(1st field),ISBLANK(2nd field),1st field > 2nd field),0,2nd field - 1st field)
It's Little delay Response to your Post ..My Solution Sholud be helps to your requirement.
1. Already You have one Field ( Ex: - In_Time__c )
2. An Another One Field Also ( Ex: - Out_Time__c )
3. You Need To update the time calculation in third field (Ex: - Total_Hours_Spent__c)
Solution: -
We can achieve this Process by using formula field ( Total_Hours_Spent__c ) . Create New Formula field as per Your requirement's .Please Do folowing Steps in your formula field.
Cheers !!!!! Be Cool And Solve This requirement as well Emma Watson, please Deactivate or Delete The Workflow you were created for this Process.
Regards,
Soundar
+91-7418425418
FYI
An Output Will Be Display Like below... Please ask feel free if you have any concern.
Regards,
Soundar.
+91-7418425418.