var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: date operator
When I issued the SQL,
SELECT DATE(02003082) FROM tab1
inorder to display the date 2003-08-22,db2 gave me the date
I am not able to deduce how db2 is doing this conversion.
Can someone tell me how exactly db2 gives me this answer?
Do you mean:
SELECT DATE(20030822) FROM tab1?
If the argument is a number:
– The result is the date that is n-1 days after January 1, 0001, where n is
the integral part of the number.
So when you say SELECT DATE(02003082) FROM tab1
it is 2,003,082 days or 5485 years after 01-01-001.
Maybe you should select SELECT '2003-08-22' FROM tab1
That was the actual intended statement.
But since db2 gave an error saying that the date
was not in the permissible range,I tried
DATE(02003082) instead of DATE(20030822) .
But I was not able to understand the conversion.
DB2 will not accept 'SELECT DATE(20030822) from Table1'
becasue it is not Y10K ready (when the world will come to an end).