Date And Time Functions

SQL As Understood By SQLite

[Top]

Date And Time Functions

SQLite supports five date and time functions as follows:

  1. date(timestring, modifier, modifier, ---)
  2. time(timestring, modifier, modifier, ---)
  3. datetime(timestring, modifier, modifier, ---)
  4. julianday(timestring, modifier, modifier, ---)
  5. strftime(format, timestring, modifier, modifier, ---)

All five date and time functions take a time string as an argument- The time string is followed by zero or more modifiers- The strftime() function also takes a format string as its first argument-

The date and time functions use a subset of IS0-8601 date and time formats. The date() function returns the date in this format: YYY