wa4_tasty_elephant
wa4_tasty_elephant

Reputation: 157

SQL: Convert date to timestamp

How can I convert a date to a timestamp?

My query:

SELECT * FROM CTP0421
WHERE timestamp <= '2016-04-04'

This doesn't work for me.

Upvotes: 0

Views: 6243

Answers (1)

Matteo Baldi
Matteo Baldi

Reputation: 5828

SELECT * FROM CTP0421
WHERE trunc(timestamp) <= to_date('2016-04-04','yyyy-mm-dd');

Upvotes: 1

Related Questions