I am trying to query a database table in django with, among others, the following columns:
id | start_time | end_time
Rather than getting the separate values for the two, can I just get the difference directly in a query?
Something to this effect:
SELECT id, Diff(start_time, end_time) FROM myTable
QuerySet.extra()will allow you to specify arbitrary expressions for a column. Note that the result will be DB-dependent.