HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Learn how to find the difference between two times using Excel
In this example, we will find the seconds between 14:00(A2)
Time A and 16:00(A3)
Time B.
Copy the values to follow the example.
Paste the values directly into your sheet.
Info:
Excel can change the format when you use the 86400 number.
Make sure to change the format back to number if it changes to time format.
Let us multiply the time by 86400.
Select cell C2
Convert time to seconds for Time A:
B2(14:00) * G1(86400) = 50400
Repeat the same for Time B: (B3(16:00) * G1(86400)
)
Select cell F9
Deduct Time B from Time A to find the difference.
Use the converted seconds to calculate (the numbers in Column C).
C3(57600) - C2(50400) = 7200 Seconds
Divide the seconds on 60 to find the minutes.
Select cell F10
F9(7200) / G2(60) = 120 Minutes
Divide the minutes on 60 to find the hours.
Select cell F11
F9(120) / G3(60) = 2 Hours
You have successfully found the time between two times, 14:00
and 16:00
.
In this case, the right answer was 7200 Seconds or 120 Minutes or 2 hours
.
function copyFormulas(elementId){ /* Get the text field */ var copyText = document.getElementById(elementId); /* Select the text field */ copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ /* Copy the text inside the text field */ navigator.clipboard.writeText(copyText.value) .then(() => { alert('Range copied to clipboard.\nIt can now be pasted into the Excel spreadsheet.') }) .catch((error) => { alert(`Copy failed! ${error}`) }) }