Extract Date or Time from a Date and Time

Mynda Treacy

October 25, 2017

We often need to extract the date or time portion from a date-time serial number for use in other functions.

We can use the INT function to extract the date portion, and the MOD function to extract the time portion.

See examples below.

Extract Date or Time from a Date and Time

The INT function returns the integer or whole number portion of the date time serial number. You can also use the TRUNC function with the same results, but that requires two more characters and we busy Excel users don't have time for that!

The Excel MOD function allows us to retain the decimal or time portion of the date-time serial number.

The syntax for MOD is:

=MOD(number, divisor)

Your date time serial number is the 'number' argument and the divisor is 1. This returns the decimal or time portion of the date-time serial number

Easy!

Want More

Learn more about how Excel handles dates and time in our comprehensive guide to working with Excel Date and Time, or download the files below.

Free eBook - Working with Date & Time in Excel

Everything you need to know about Date and Time in Excel - Download the free eBook and Excel file with detailed instructions.

Enter your email address below to download the comprehensive Excel workbook and PDF.



By submitting your email address you agree that we can email you our Excel newsletter.
AUTHOR Mynda Treacy Co-Founder / Owner at My Online Training Hub

CIMA qualified Accountant with over 25 years experience in roles such as Global IT Financial Controller for investment banking firms Barclays Capital and NatWest Markets.

Mynda has been awarded Microsoft MVP status every year since 2014 for her expertise and contributions to educating people about Microsoft Excel.

Mynda teaches several courses here at MOTH including Excel Expert, Excel Dashboards, Power BI, Power Query and Power Pivot.

Leave a Comment

Current ye@r *