SQLite Forum

How to convert am/pm time to 24hrs time format
Parsing of time strings other than ISO formatted ones isn't really SQLite's strong suit. If you want to feed am/pm time strings into the SQLite shell, you're probably better off converting the time strings using external means, maybe a Python program or some other programming language that you feel comfortable with. If you are using SQLite embedded in a C program, maybe you can use the `strptime` function to do what you want.

If the time strings in question follow a very rigid format, you may be able to do it combining SQLite's `substring` function along with some CASE expressions, but that would be cumbersome and quite fragile.