TIME (time of day without time zone)

Last updated: 2026-11-04

TIME (time of day without time zone)

TIME expresses a moment within a day, with neither date nor time zone, ranging from 00:00:00 to 24:00:00 with microsecond resolution stored as an 8-byte microsecond count. It fits opening hours, check-in times and scheduled daily jobs. Note that 24:00:00 is accepted, but it denotes a full 24 hours and is not equal to 00:00:00, so business rules are better off avoiding it.

Kindtype
Example LanguageSQL

📝 Syntax

TIME  |  TIME WITHOUT TIME ZONE  ——  time of day, no zone, 8 bytes, microsecond precision
TIME(precision)  ——  specifies fractional-second precision

Returns:Stores a time of day at microsecond precision. Adding an INTERVAL yields a new time of day, and additions that cross midnight wrap around into the following day.

▶ Example

Runs real PostgreSQL 18 right in your browser (PGlite WASM, nothing to install). Press ▶ Run and the result appears in the panel below.

Output:

 id | open_at  | close_at | duration |        col_type
----+----------+----------+----------+------------------------
  1 | 09:00:00 | 18:30:00 | 09:30:00 | time without time zone
  2 | 22:15:00 | 23:59:59 | 01:44:59 | time without time zone

📌 Key Points

More case studies coming soon.

📚 Related Reference

❓ FAQ

QTIME versus TIME WITH TIME ZONE?
ATIME carries no zone, it is only a clock reading; TIMETZ records an offset but has no date reference, which makes day boundaries and daylight saving error-prone. In practice use TIME together with DATE, or go straight to TIMESTAMPTZ.
QWhy is 24:00:00 confusing?
ABecause it is a legal boundary value denoting a full 24 hours, yet in comparisons it is not equal to 00:00:00 of the next day. Avoiding the ambiguity means sticking to the 00:00:00 to 23:59:59 range.
Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

Content reviewed by MOTO · Found an error? Report it

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏