Sorry, that should have read: When I look at the transactions table I have dates in the following formats: 1: YYYYmmddHHMMSS 2: YYYY-mm-dd HH:MM:SS Unfortunately, the sqlite date, datetime, strftime functions will not recognise the first format as a date.