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
sclosesclose 

Date/Time Field

Looking to find a formula that will combine 2 Date/Time fields and calulate time. Like for example:

 

Start Time: 2/5/13 10:00am

Stop Time: 2/5/13 11:30am 

 

Total: 1.50 or 1hr 30 mins

 

Can some please help?

 

Thanks,

SC

Best Answer chosen by Admin (Salesforce Developers) 
phiberoptikphiberoptik
Thanks Jeff for covering for me.

All Answers

phiberoptikphiberoptik

 You can create a formula field with NUMBER output and use this formula:

 

((Date/Time1_Field__c - Date/Time_Field2__c)*1440)

 


You will end up with 1.50 though as Salesforce does not support minutes.

sclosesclose

I will try this. 

 

Thank you so much!! 

Shawn

phiberoptikphiberoptik

Cheers. Once it works, please come back and mark the correct answer as the Solution.

sclosesclose

10-4!!

sclosesclose

Can you explain to me what the 1440 means?

phiberoptikphiberoptik

Number of minutes in a day.

 

60 * 24

sclosesclose

OK thank you. This is working kinda. So here is my dilima. Here is my formula: ((Stop__c - Start__c)*1440) 

 

These 2 fields are Date/Time Fields:
Field 1: Start  2/5/13 12:14pm

Field 2: Stop  2/5/13 12:15pm

Field 3: Number Formula Field = 1.00

 

Is there any way to display this field like this 0.01

Jeff MayJeff May

divide by 100 should do it

phiberoptikphiberoptik
Thanks Jeff for covering for me.
This was selected as the best answer
sclosesclose

Thank you Jeff!!

sclosesclose

Thank you again for your help!!