Quote:
|
I need to add ex. 6 months to this date,
|
Although I don't know so much about DB2 for iSeries,
I don't think that you can add months to INT value directly.
An idea I thought was ...
1) Convert the INT value to a valid date string.
2) CAST the string to date.
3) Add months.
Here is a sample expression.
DATE( TRANSLATE( 'abcd-ef-gh' , DIGITS(transaction_date) , '..abcdefgh' ) ) + 6 MONTHs
Quote:
|
then divide by 6 to get AVG usage for 6 months.
|
I couldn't understand it.
divide WHAT by 6?
"divide date by something" may be nonsense.