When working with datetime values in Excel, there are often instances where you only need to extract the time portion, leaving out the date. This is a common requirement in various data analysis and reporting tasks. Fortunately, Excel provides a few straightforward methods to extract the time from a datetime value. In this article, we'll explore these methods, including using formulas, formatting, and other techniques, to help you easily extract the time from datetime in Excel.
Understanding Datetime Formats in Excel

Before diving into the methods for extracting time, it's essential to understand how Excel handles datetime values. Excel stores dates and times as serial numbers, where each whole number represents a day, and the decimal portion represents the time. This serial number system allows for easy calculations and manipulations of datetime values.
Datetime Format Codes
Excel uses format codes to display datetime values in a human-readable format. For example, the format code "MM/DD/YYYY HH:MM:SS" would display a datetime value like "02/16/2023 14:30:00". Understanding these format codes is crucial for extracting the time portion of a datetime value.
Method 1: Using the TIMEVALUE Function

One of the most straightforward methods to extract the time from a datetime value is by using the TIMEVALUE function. This function takes a time in text format and returns a decimal value representing the time.
Formula: =TIMEVALUE(A1)
Where A1 contains the datetime value.
This formula will return a decimal value representing the time, which can then be formatted to display the time in the desired format.
Example:
Datetime Value | Formula | Result |
---|---|---|
02/16/2023 14:30:00 | =TIMEVALUE(A1) | 0.6 |
The result, 0.6, represents 14:30:00 in decimal format. To display this value as a time, you can format the cell using the "HH:MM:SS" format code.
Method 2: Using the HOUR, MINUTE, and SECOND Functions

Alternatively, you can use the HOUR, MINUTE, and SECOND functions to extract the time from a datetime value. These functions return the hour, minute, and second components of a time value, respectively.
Formulas:
=HOUR(A1)
=MINUTE(A1)
=SECOND(A1)
Where A1 contains the datetime value.
These formulas can be combined to create a time value in the desired format.
Example:
Datetime Value | Formula | Result |
---|---|---|
02/16/2023 14:30:00 | =HOUR(A1) & ":" & MINUTE(A1) & ":" & SECOND(A1) | 14:30:00 |
This formula combines the hour, minute, and second values to create a time value in the format "HH:MM:SS".
Method 3: Using Formatting

Another approach to extract the time from a datetime value is by using formatting. You can format the cell containing the datetime value to display only the time portion.
To do this, select the cell containing the datetime value, go to the Home tab in the Excel ribbon, and click on the "Number" group. Then, select "Time" from the dropdown menu and choose the desired time format.
This method does not require any formulas, making it a quick and easy solution.
Conclusion
Extracting the time from a datetime value in Excel can be accomplished using various methods, including the TIMEVALUE function, the HOUR, MINUTE, and SECOND functions, and formatting. Each method has its advantages and disadvantages, and the choice of method depends on your specific requirements.
By mastering these techniques, you can easily extract the time from datetime values in Excel and perform various data analysis and reporting tasks with confidence.
We hope this article has helped you learn how to extract the time from datetime values in Excel. If you have any questions or need further assistance, please don't hesitate to ask.
Extract Time From Datetime In Excel Image Gallery










Feel free to share this article with others who may find it helpful. If you have any questions or need further assistance, please don't hesitate to ask.