SQLite Date Time Functions

This page organizes commonly used date and time functions in SQLite.

  1. date

    The SQLite date() function converts a time value specified by a time value and modifiers to a date string in YYYY-MM-DD format.
  2. datetime

    The SQLite datetime() function converts a time value specified by a time value and modifiers to a datetime string in YYYY-MM-DD HH:MM:SS format.
  3. julianday

    The SQLite julianday() 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.
  4. strftime

    The SQLite strftime() unction outputs a specified time value corresponding the specified time value and modifiers in the specified format.
  5. time

    The SQLite time() function converts a time value specified by a time value and modifiers to a time string in HH:MM:SS format.
  6. unixepoch

    The SQLite unixepoch() function converts a time value specified by a time value and modifiers to a Unix timestamp, that is, the number of seconds from UTC 1970-01-01 00:00:00.