Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR EXCEL

Time and date maths in Excel

=A2-B2	Calculates the difference between the time values in cells A2 and B2.
=TIMEVALUE("8:30 PM") - TIMEVALUE("6:40 AM")	Calculates the difference between the specified times.
=TIME(HOUR(A2), MINUTE(A2), SECOND(A2)) - TIME(HOUR(B2), MINUTE(B2), SECOND(B2))	Calculates the time difference between values in cells A2 and B2 ignoring the date difference, when the cells contain both the date and time values.
 
PREVIOUS NEXT
Tagged: #Time #date #maths #Excel
ADD COMMENT
Topic
Name
5+4 =