SQLite julianday() function
Description
The SQLite julianday() function returns the Julian day - the number of days since noon in Greenwich on November 24, 4714 B.C.
Syntax:
julianday(timestring, modifier, modifier, ...)
Example-1:
Compute the number of days since the day of Independence of India.
SELECT julianday('now') - julianday('1947-08-15');
Here is the result.
julianday('now') - julianday('1947-08-15') ------------------------------------------ 24549.5019360879
Example-2:
Compute the time since the unix epoch in seconds (like strftime('%s','now') except includes fractional part):
SELECT (julianday('now') - julianday('1947-08-15'))*869872.568;
Here is the result.
(julianday('now') - julianday('1947-08-15'))*869872.568 ------------------------------------------------------- 21354952671.2493
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework