: strftime. , ISO 8601 ( Unix).
SQL , . - .
def fix_timestamp(timestamp):
return datetime.datetime.strptime(timestamp, '%m/%d/%Y %I:%M:%S %p') \
.strftime('%Y-%m-%d %H:%M:%S')
db = sqlite3.connect('...')
db.create_function('FixTimestamp', 1, fix_timestamp)
UPDATE TheTable SET TheColumn = FixTimestamp(TheColumn).