ThisCalculator

Everyday

Extract Time From a Date and Time

Updated · Standard formula, shown below

Extracted time 14:35
Minutes after midnight
875.00 min
Result
Hour
14 h
You entered
Minute
35 min
You entered

Extract Time From a Date and Time

To extract the time from a date-and-time value, keep the time portion and discard the calendar date. This calculator takes the value’s hour, minute, and second as inputs and returns the time of day in 24-hour format; it also shows the equivalent number of minutes after midnight.

Formula

The time of day is the elapsed time since midnight, displayed as hours, minutes, and seconds. Convert the inputs to minutes after midnight using:

T = 60h + m + s / 60

  • h is the hour on a 24-hour clock, from 0 through 23.
  • m is the minute within that hour, from 0 through 59.
  • s is the second within that minute, from 0 through 59.
  • T is the time of day expressed as minutes after midnight. The calculator formats this value as HH:MM.

The calendar date does not appear in the formula because it does not affect the time portion. For example, 14:35 on Monday and 14:35 on Saturday have the same extracted time.

Worked Example

Using the calculator’s defaults—14 hours, 35 minutes, and 0 seconds:

  1. Convert the hours to minutes: 14 × 60 = 840 minutes.
  2. Add the remaining minutes: 840 + 35 = 875 minutes after midnight.
  3. Format the hour and minute: 14:35, or 2:35 p.m. in 12-hour notation.

The extracted time is 14:35, and the total is 875.00 minutes after midnight.

What It Means to Extract Time

A date-and-time value combines two different kinds of information: a calendar date and a time of day. For example, the value “2026-11-08 14:35:00” identifies a particular date and a particular point during that date. Extracting the time returns “14:35:00” and leaves the date behind.

This is not the same as calculating a duration. A time of day answers “What time is it?” A duration answers “How long did something take?” The number 14:35 is a clock reading; 14 hours and 35 minutes is a duration only when it describes elapsed time. The calculator’s minutes-after-midnight output is a convenient numeric representation of a clock reading, not a claim that an event lasted that long.

When to Use the Extracted Time

Separating the time portion can make it easier to group, compare, or display records by time of day, regardless of their dates. It can also help when a system expects a clock time but a source value includes both date and time.

  • Scheduling: Take the time from an appointment entry when its date is handled separately.
  • Sorting daily events: Compare clock readings from different dates to see which occurred earlier in the day.
  • Data cleanup: Prepare a time-only value for a report or spreadsheet column.
  • Time-of-day analysis: Group timestamps into morning, afternoon, or other intervals, while keeping the date available for separate analysis.

If you need to know how many hours passed between two timestamps, subtract the complete date-and-time values instead. Extracting only the times can give a misleading answer when the events occurred on different days.

Time Formats and Date-Time Values

The calculator uses a 24-hour clock. In this format, hours run from 00 through 23: 00:00 is midnight, 12:00 is noon, and 14:35 is 2:35 p.m. A 12-hour display would write that last example as 2:35 p.m. The two formats represent the same time; the 24-hour version avoids needing an AM or PM label.

Seconds may matter when the source includes them. For example, 14:35:42 means 14 hours, 35 minutes, and 42 seconds. The calculator includes seconds when converting to minutes after midnight, but its clock output is HH:MM, so that display does not show seconds. If second-level precision is important, preserve the original seconds or use a format that displays HH:MM:SS.

Some date-time systems store a timestamp as a number rather than as visible calendar and clock fields. The displayed time can depend on the time zone used to interpret that number. A timestamp shown as 14:35 in one zone may appear as a different local clock time elsewhere. Extraction should therefore happen after choosing the intended time zone.

Common Mistakes and Limitations

  • Entering a 12-hour hour without converting it: For 2:35 p.m., enter 14 hours and 35 minutes. For 2:35 a.m., enter 2 hours and 35 minutes.
  • Using an invalid field value: Minutes and seconds should each be from 0 through 59. Convert overflow sensibly—for example, 90 minutes is 1 hour and 30 minutes—rather than treating 90 as a valid minute field.
  • Confusing time with elapsed time: Subtracting clock readings alone does not account for a date change. From 23:50 to 00:20 is 30 minutes only if the second time is on the following day.
  • Ignoring time zones: Extraction does not determine which zone a timestamp belongs to. Convert or interpret the source in the intended zone first.
  • Rounding away needed precision: HH:MM omits seconds. Use the original seconds if exact event ordering or second-level timing matters.

The calculator assumes that the inputs already describe one valid 24-hour clock time. It does not parse a date string, infer AM or PM, convert time zones, account for daylight-saving transitions, or determine whether two timestamps are on the same date.

Frequently Asked Questions

How do I extract time from a date and time in a spreadsheet?
Use the spreadsheet’s time-extraction or formatting features, depending on whether you need a separate time value or only a time-only display. The exact function and format syntax vary by spreadsheet program. Make sure the source is stored as a date-time value rather than plain text.

Does extracting time change the original date?
No. Conceptually, extraction returns the clock portion as a separate value. Whether the original cell or record is changed depends on the software or formula you use; a separate output can preserve the source.

What is 14:35 in 12-hour time?
It is 2:35 p.m. To convert afternoon hours above 12, subtract 12 from the hour. Midnight is written as 00:00 in 24-hour notation and 12:00 a.m. in 12-hour notation.

How do I extract hours only?
Use the hour component of the time, rather than the full time-of-day value. For 14:35:42, the hour is 14 in 24-hour notation, or 2 p.m. in 12-hour notation.

How do I calculate the time between two date-and-time values?
Subtract the earlier complete timestamp from the later one, retaining both dates. If you subtract only their time portions, the result may be wrong when the interval crosses midnight or spans multiple days.

Related

Formula used
in h | Hour | h | 14 | 0
in m | Minute | min | 35 | 0
in s | Second | s | 0 | 0
out time | Extracted time | - | h * 60 + m + s / 60 | clock
out total | Minutes after midnight | min | h * 60 + m + s / 60 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.