I have a table in PostgreSQL created by SQLAlchemy just like that:
Column('dt_index_tex', DateTime)
If I insert a date like '21-01-2014', when querying I get the date in different format:
SELECT dt_index_tex from table;
dt_index_tex |
------------------------+
2014-01-21 00:00:00 |
how could i query in DMY format ?
I know in PostgreSQL I have the to_char
function, but I want something to do with SQLAlchemy, so I don't have to change the format all times I query the table.
I guess I have to try a different way of creating the table, but don't know what is missing.