If you change the slashes to hyphens, those strings would be in [ISO 8601 format][1], which then means SQLite's [date and time functions][2] will operate on them, which allows something like this to work: SELECT julianday(hours2) - julianday(hours1) FROM mytable WHERE criterion; That gives you the delta in fractional days. If you want seconds instead, multiply by 86400. [1]: https://en.wikipedia.org/wiki/ISO_8601 [2]: https://sqlite.org/lang_datefunc.html