For reporting purposes, I would like to retrieve my date(digits(mydate7)) field as mm/yyyy.
I have tried month(date(digits(mydate7)) + '/' + year (date(digits(mydate7)) as mmyyyy but get null as result. I can test with month(date(digits(mydate7)) and the year function individually and get a return set of data but not combined in field.
DB2/400 uses the double pipe character for concatenation:
Assuming
mydate7is in the formatyyyydddyou could simplify it as:Simplified further with implicit casting:
See the concatenation operator for more information.