HI Marc
Im retrieving data from SAP R/3, wc is using IBM DB2 as their database. We r using an extracting tool to retrieve the tables from SAP into another application developement tool using SQL .( I hope im making sense here :-))
Being relatively new to DB2, im not sure of the extensive...
Thanks for all the replies..
im not using v7 , but from the example codes given , i ve got a rough idea on how to proceed .
my final code looks like this :
LTRIM(RTRIM(CHAR(YEAR(CURRENT DATE - 1 MONTH )))) ||
CASE WHEN MONTH(CURRENT DATE - 1 MONTH ) < 10 THEN '0'||...
btw, when u use the above statement , the result wuld be
2002421 , the '0' in '04' is truncated becoz of the char(), is there any way to retain the month as MM i.e '04' and not '4' .
same applies for the char(day()) function.
Thanks for the reply .
I have since tried concatenating the '0' with the rest of the statements but still it doesnt work ...
where create date = char(year(current date) || '0' || char(month(current date)) || char(day(current date)))
did i miss out anything ?
HI
I have a query on the date format .
I am retrieving data from a SAP DB2 based on selection date.
In the tables , the dates in the table are displayed as yyyymmdd.
When i use the statements
select....
....
where create date = '20020821'(hardcoded)
or
where create date =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.