How to convert Date to DateTime in PostgreSQL?
postgresql
Solution
There is no `DateTime` type in PostgreSQL, there's `timestamp`.
To convert simply do `expiration_date::timestamp` but I think it should work without conversion. `WHERE expiration_date < '2013-03-21 13:14:00'` should be valid.
Problem
I'm trying to make the following work in PostgreSQL: ``` SELECT * FROM purchases WHERE CONVERT(expiration_date) < '2013-03-21 13:14:00' ``` Where `CONVERT` is some method that would convert `Date` to `DateTime`. Any idea how to do this?