日期与时间

时长计算器

计算时间间隔,支持跨午夜。

输入数据

由 UtilBrix 提供支持

Without dates, an earlier end time means the following day. Calendar durations do not adjust for time-zone transitions.

计算结果

Duration
8h 30m 0s
Decimal hours
8.5
Total minutes
510
Total seconds
30,600

详细方法和示例目前以英语提供。

Step-by-step instructions (English)

  1. Enter start and end times, including seconds if needed.
  2. Add dates when the interval spans more than one day or you need an explicit chronology.
  3. Calculate and compare hours/minutes/seconds with decimal hours.

公式与方法

Convert each time to seconds after midnight and subtract. Without explicit dates, an earlier end time adds 24 hours. With dates, add the elapsed calendar days and reject a negative overall duration. Decimal hours equal seconds divided by 3,600.

实际示例

From 22:30 to 01:15 without dates, the overnight duration is 2 hours and 45 minutes, or 2.75 decimal hours.

When this tool is useful

Check the length of a session, an overnight shift, or a recorded activity. Decimal hours help when a downstream worksheet expects a single number rather than an hours-and-minutes duration.

Common mistakes and limitations

  • 2 hours 30 minutes is 2.5 decimal hours, not 2.30.
  • This is a wall-clock calculation. It does not adjust elapsed time for a time-zone or daylight-saving transition.

Practical questions about this tool (English)

How is an earlier end time handled without dates?

It is treated as occurring on the following day. For example, 22:30 to 01:15 gives 2 hours 45 minutes. Supply dates for longer intervals.

Does the duration subtract breaks?

No. It measures the entered interval. Subtract unpaid breaks separately if you are using the output for a timesheet.

相关工具

安装UtilBrix

从主屏幕快速访问工具。

  1. 打开浏览器菜单(⋮)。
  2. 选择“安装应用”或“添加到主屏幕”。
  3. 确认将UtilBrix添加到主屏幕。

如果找不到此选项,请在Android版Chrome中打开页面。

搜索工具

↑ ↓ Navigate · Enter Open · Esc Close