SQLite 3 reference · Date and Time Functions

SQLite TIME() Function

Return the time part of a date/time as text in HH:MM:SS form, optionally shifted with modifiers.

SQLite 3

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

time(time-value, modifier, ...)

Parameters

ParameterDescription
time-value A date/time: 'YYYY-MM-DD', 'YYYY-MM-DD HH:MM:SS', 'now', a Julian day number, or a Unix time with the 'unixepoch' modifier.
modifiers optional Adjustments applied left to right, such as '+1 day', '-3 months', 'start of month', 'weekday 1', 'localtime', 'unixepoch'.

Return value

Text HH:MM:SS, or NULL.

Examples

TimesTry it yourself
SELECT time('2026-01-05 14:30:59') AS t,
       time('14:30', '+90 minutes') AS later;

Output

t | later
14:30:59 | 16:00:00
Fractions of a second (3.42+)Try it yourself
SELECT time('2026-01-05 10:00:00.250', 'subsec') AS with_ms;

Output

with_ms
10:00:00.250

Was this page helpful?