SELECT '2012-02-10' - EXTRACT(DAY FROM '2012-02-10')
Answer set is 20120200.00
I've mentioned it in single quotes to identify it as char. But database process this as integer expression. Shouldn't be an error in this scenario?
Casting as DATE works fine as dieter mentioned.
SELECT '2012-02-10'; --Output: '2012-02-10'
SELECT 2012-02-10; --Output: 2000
/* This scenario donot convert char -> integer */
Version TD12.0
↧