SQLite Forum

Calculating duration in ISO8601 timestamp
Login
If you use a colon instead of a dot to separate the whole seconds from the fractional seconds, it isn't [ISO 8601][1], so it [isn't legal in SQLite][2]. This includes `strftime()`.

Rather than continue to arm-twist bad data formats in place, I'd reimport those columns. While you're at it, add a "T" between the date and time parts and put a "Z" on the end to make it absolutely clear that you're giving the time in UTC. 

And if you aren't using UTC, convert the time from whatever local time zone you mean to UTC so the data doesn't break *again* when you encounter two or more time zones in a single calculation.

[1]: https://en.wikipedia.org/wiki/ISO_8601
[2]: https://sqlite.org/lang_datefunc.html