Javatpoint Logo
Javatpoint Logo

Date and Time() Functions

In SQLite, date and time() functions are used to retrieve current date and time. The date and time functions use a subset of IS0-8601 date and time formats.

There are 6 different date and time functions which return and do calculation on date and time in different formats:

  • SQLite date() Function
  • SQLite datetime() Function
  • SQLite julianday() Function
  • SQLite now() Function
  • SQLite strftime() Function
  • SQLite time() Function
Index Functions Description
1) SQLite date() function The SQLite date() function is used to calculate the date and return it in the format 'YYYY-MM-DD'.
2) SQLite datetime() function The SQLite datetime() function is used to calculate a date/time value, and return it in the format 'YYYY-MM-DD HH:MM:SS'.
3) SQLite julianday() function The SQLite julianday() function returns the date according to julian day. A Julian Day is the number of days since Nov 24, 4714 BC 12:00pm Greenwich time in the Gregorian calendar. It returns the date as a floating point number.
4) SQLite now() function Actually now is not a function. Rather than it is a timestring parameter which is used in various SQLite functions to retrieve the current date and time.
5) SQLite strftime() function The SQLite strftime() function is used to return date in a formatted manner and also facilitates you to do calculation on dates.
6) SQLite time() function SQLite time() function is used to calculate time and return it in the format 'HH-MM-SS'.

Next TopicSQLite Date




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA