To convert a time from one time zone to another, you can use a formula that converts hours entered as whole numbers to the decimal values that Excel recognizes as times. In the example shown, the formula in F5 is:
To make sure we have a true time value, we need to ensure that we have only a decimal value. In other words, if we add 12 hours (.5) to 6 PM (.75) we'll get 1.25, but we really only want .25.
To make sure we get just the decimal value, we use the MOD function with a divisor of 1, as a clever way to keep the formula simple.
MOD returns the remainder after division, so returns the decimal value in cases where the result is greater than 1 (i.e. greater than 24 hours).
Even better, if we end up with a negative fractional value, MOD returns the reciprocal. So, if we end up with -.25, MOD returns .75 (equivalent to 6 PM).
This is important, because Excel won't display negative time values.
Some date values include both a date and time, and are sometimes called "datetimes". These values include both a serial number to represent the date, plus a fractional value to represent time. The table below shows some examples:
3/6/18 6:00 AM
June 3, 1980 12:00 PM
When working with dates that include both a date and time (datetimes), you don't need to use MOD, because there's no need to do anything clever as times cross midnight. The operation becomes simple addition, because the date is included, and you can use a formula like this:
This will allow the date value change as needed (forwards or backwards) when time adjustments cross 12:00 AM.
Excel handles dates and time using a scheme in which dates are serial numbers and times are fractional values . For example, June 1, 2000 12:00 PM is represented in Excel as the number 36678.5, where 36678 is the date portion and .5 is the time...
Excel handles dates and times using a system in which dates are serial numbers and times are fractional values. For example, June 1, 2000 12:00 PM is represented in Excel as the number 36678.5, where 36678 is the date (June 1, 2000) and .5 is the...
The complexity of calculating the number of hours between two times stems from times that cross midnight. This is because times that cross midnight often have a start time that is later than the end time (i.e. start at 9:00 PM, end at 6:00 AM). This...
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.