Date and Time() Functions in SQLite

To get the current date and time, the date and time() functions are used in SQLite. It uses a subset of IS0-8601 date and time formats.

 

FUNCTION USES
SQLite date() function To calculate the date and return it in the format ‘YYYY-MM-DD’.
SQLite datetime() function To calculate a date/time value, and return it in the format ‘YYYY-MM-DD HH:MM:SS’.
SQLite julianday() function To get the date according to julian day, which is the number of days since Nov 24, 4714 BC 12:00pm Greenwich time in the Gregorian calendar.
SQLite now() function Time String parameter.

To retrieve the current date and time.

SQLite strftime() function To get date in a formatted manner.

To do calculation on dates.

SQLite time() function To calculate time and return it in the format ‘HH-MM-SS’.

 

Please Share