Tip: Other languages are Google-Translated. You can visit the English version of this link.

Extract or get time only from datetime in Excel

If you have a list of datetime cells, now, you want to pull out all the times only from the datetime cells. In Excel, there are some functions can help you to solve this job, such as: TIME and MOD functions.


Extract time only from date time cells with TIME function

Normally, the TIME function is used to create a time with separate hours, minutes and seconds, to extract the time from datetime cells, the generic syntax is:

=TIME(HOUR(datetime),MINUTE(datetime), SECOND(datetime))
  • datetime: The cell contains the datetime that you want to extract time only from.
  • HOUR(), MINUTE(), SECOND(): These three arguments are used to extract the separate hour, minute and second number from the date cell.
  • TIME: This function is used to combine the hour, minute and second numbers into a time format.

1. To pull out the times from datetime cells, you should apply below formula:

=TIME(HOUR(A2),MINUTE(A2), SECOND(A2))

And then, drag the fill handle down to the cell you want to use this formula, see screenshot:

2. Then, you can format the formula cells to the time format you need. Select the calculated results, and then, right click, then choose Format Cells to open the Format Cells dialog box, in the popped-out dialog, specify a time format you need in the Time category, see screenshot:

3. After setting the time format, click OK button, the calculated times have been changed to the time format you need, see screenshot:


Extract time only from date time cells with MOD function

As we all know, the datetime is recognized as serial number, the integer part is a date serial number, and the fractional portion is time serial number in Excel. Normally, the MOD function returns just the fractional portion, and discards the integer part. So, the MOD function can help you to extract time from date time cell quickly and easily.

Generic syntax:

=MOD(datetime,1)
  • datetime: The cell contains the datetime that you want to extract time only from.
  • 1: A divisor number to divide with. Use 1 as the divisor, the result will be the fractional part of the number.

1. Enter or copy the below formula into a blank cell, and then drag the fill handle down to the cells you want to apply this formula:

=MOD(A2,1)

2. And then, you should format the formula cells as a specific time format you need as the above step 2, you will get the result as this:


Relative functions used:

  • TIME:
  • This function is used to return the decimal number for a particular time with hour, minute and second.
  • MOD:
  • It returns the remainder of two numbers after division.

Relative time articles:

  • Add Or Sum Times Over 24 Hours In Excel
  • Normally, when adding or summing times in Excel, you will get the finally calculated result within 24 hours. How about adding or summing times over 24 hours to display the real result?
  • Remove Date From Date Time In Excel
  • If you have a list of date and time stamps in your worksheet, and now you want to remove the date from the date time and only leave the time. Do you have any quick methods to deal with this job?

Excel Productivity Tools

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 70% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.