I need to calculate the difference between two dates represented as TEXT. julianday()
can do this, but it accepts a literal:
select(julianday('2015-01-01 12:00:00') - julianday('2015-01-01 13:00:00'))
But if I have a table:
CREATE TABLE "time_u" (
"time_in" TEXT,
"time_out" TEXT
);
INSERT INTO time_u (time_in, time_out)
VALUES ('2007-01-01 10:00:50', '2007-01-01 11:00:00')
how can I do something like? :
julianday(time_u.time_out-time_u.time_in)
in other words take values directly from the database and subtract them as a date