SQLite Date Time Functions
This page organizes commonly used date and time functions in SQLite.
-
date
The SQLitedate()function converts a time value specified by a time value and modifiers to a date string inYYYY-MM-DDformat. -
datetime
The SQLitedatetime()function converts a time value specified by a time value and modifiers to a datetime string inYYYY-MM-DD HH:MM:SSformat. -
julianday
The SQLitejulianday()function converts a time value specified by a time value and modifiers to a Julian days, that is, the number of days since 12:00 PM GMT on November 24, 4714 BC. -
strftime
The SQLitestrftime()unction outputs a specified time value corresponding the specified time value and modifiers in the specified format. -
time
The SQLitetime()function converts a time value specified by a time value and modifiers to a time string inHH:MM:SSformat. -
unixepoch
The SQLiteunixepoch()function converts a time value specified by a time value and modifiers to a Unix timestamp, that is, the number of seconds fromUTC 1970-01-01 00:00:00.