How the JulianDay() Function Works in SQLite

The SQLite julianday() function returns the number of days since noon in Greenwich on November 24, 4714 B.C. (using the Proleptic Gregorian calendar).

If using the proleptic Julian calendar, this is Monday, January 1, 4713 BC.

Julian day is the continuous count of days since the beginning of the Julian Period. It’s typically used by astronomers, software, etc to calculate elapsed days between two events.

To use this function, you need to provide a time string, plus any (optional) modifiers. A modifier allows you to change the date, such as add a number of days, set it to local time, etc

Continue reading

How the DateTime() Function Works in SQLite

The SQLite datetime() function enables you to return a date and time value based on a time string and any modifiers.

It returns the date in this format: YYYY-MM-DD HH:MM:SS

To use this function, you need to provide a time string, plus any (optional) modifiers. A modifier allows you to change the date, such as add a number of days, set it to local time, etc

Continue reading