I have a database table, which I am accessing through SQLAlchemy. Each row is timestamped, but unfortunately it isn't simply a column with a DATE type.
It is timestamped with two columns. One is the date as a string (not in the ISO format "YYYY-MM-DD" format, but in the Commonwealth "DD/MM/YYYY" format.) and the other is the time as a string.
I could get the data into Python and convert it to a datetime.datetime with strptime but I want to filter the rows in SQL.
How can I write SQL to do the equivalent of Python's strptime? - e.g. take the concatenated parts of a string and interpret it as a date? (I can figure date->string, but not string->date.)
How can I persuade SQLAlchemy to generate that SQL?