Hello sonixax,
Assuming your dates are stored in the following format : yyyy-mm-dd you could try something like this :
SELECT JULIANDAY(end_date) - JULIANDAY(start_date) AS date_difference_in_days FROM table_name
If the date you want a difference with is the date of today, you could use :
SELECT JULIANDAY('now') - JULIANDAY(start_date) AS date_difference_in_days FROM table_name
And if you want to include the current day in the total, just add a +1 to your query
SELECT JULIANDAY('now') - JULIANDAY(start_date) + 1 AS date_difference_in_days FROM table_name
SIDE NOTE : you will get decimals to the calculation, you could round the result and get it without decimals with :
SELECT FLOOR(JULIANDAY('now') - JULIANDAY(test_date) + 1) AS days_inclusive FROM asset
FLOOR will only keep the non decimal part of your result while ROUND would behave differently if the decimal part is lower or greater that 0.5 ROUNDING up or down.
Hope it helped
Cheers
Math
I'm a very good housekeeper !
Each time I get a divorce, I keep the house
Zaza Gabor