Sqlite – Difference between 2 dates in SQLite

sqlite

How do I get the difference in days between 2 dates in SQLite? I have already tried something like this:

SELECT Date('now') - DateCreated FROM Payment

It returns 0 every time.

Best Solution

 SELECT julianday('now') - julianday(DateCreated) FROM Payment;