query to return specific date from teradata timestamp(6)

RRR picture RRR · Oct 22, 2013 · Viewed 43.3k times · Source

How can i search for a particular date for eg: '2013-10-22' from teradata timestamp(6) field?

sel * from table A
where date = '2013-10-22';

I tried the above query which is throwing error. Please help!

Answer

Rahul Tripathi picture Rahul Tripathi · Oct 22, 2013

You may try like this:-

sel * from table A
where date = date '2013-10-22';

Since in ANSI standard form (must be preceded by the keyword DATE)

Check out this