function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adeline MooreAdeline Moore 

Need Formula Help Please:)

I created a time clock app very basic 5 required fields:
User-added image
Here are my questions:
1. I would like a formula to calculate the hours volunteered that day
2. I would like to add a "Submit" button (Most will be accessing this on salesforce 1 mobile)
3. I would also like to add actions at the end
     a. Update a Volunteer hours Campaign
     b. Update the Members contact record with their hours
Best Answer chosen by Adeline Moore
VIGNESH BALASUBRAMANIANVIGNESH BALASUBRAMANIAN
Hi Adeline Moore ,

Change In-Time and Out-Time fields to data/time format and use below formula. It will work perfectly

(FLOOR((  Out_Time__c -  In_Time__c )*24)) 
+
ROUND((((
((Out_Time__c - In_Time__c )*24)-
FLOOR((Out_Time__c - In_Time__c )*24))
*60)/100),2)


Result :

User-added image

All Answers

Adeline MooreAdeline Moore
Here is my attemp at a formula for this:
User-added image

Please help
Akhil AnilAkhil Anil
Try this. 
 
VALUE(TEXT(Time_Out__c)) - VALUE(TEXT(Time_In__c))

Kindly mark it as an answer if that works !
VIGNESH BALASUBRAMANIANVIGNESH BALASUBRAMANIAN
Hi Adeline Moore ,

Change In-Time and Out-Time fields to data/time format and use below formula. It will work perfectly

(FLOOR((  Out_Time__c -  In_Time__c )*24)) 
+
ROUND((((
((Out_Time__c - In_Time__c )*24)-
FLOOR((Out_Time__c - In_Time__c )*24))
*60)/100),2)


Result :

User-added image
This was selected as the best answer
Adeline MooreAdeline Moore
Vignesh,
This worked Perfectly just had to switch the order of In Time to Time In etc. Thank you very much!