In excel, dates are handled as serial numbers while times as fractional values. There are times when we want to extract time from a date and time. To do this, you will need to use a formula that is based on the MOD function. This article provides an elaborative procedure on how you can use the MOD function to extract time from a date and time in excel.
Figure 1: Extracting time from date and time using MOD function
Syntax of the formula
=MOD (date, 1)
- Date- is the date and time from which you want to extract time.
Understanding the formula
- MOD function is fundamental when it comes to returning a remainder after division.
- For instance, if the date is in cell B5, then we can have the formula for this as; =MOD(B5,1)
- In this formula, the first argument is always the number, while the second is the divisor.
- MOD will bring the fractional part of the number, which in our case is the date.
- The ability of the MOD function to ignore the integer part and just bring the fractional part makes it the most convenient to extract time from date and time.
The use of the MOD function to extract time from date and time is simply a general format. We can use the formula below to convert the general format to date and time;
This will bring the result as shown in the figure below;
Figure 2: Example of how to extract time from date and time using time format
Instant Connection to an Expert through our Excelchat Service
Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.