Thread: Db2
-
Db2
First, I want to add 6 months to the current date and then extract the month and year from the resulting date.
When I run these queries(given below) separately, it works fine, but could someone tell me how to trim the day out of this date or how to extract just the month and the year from the resulting date.
SELECT month( ADD_MONTHS(CURRENT_TIMESTAMP,6)) from SYSIBM.SYSDUMMY1
SELECT year( ADD_MONTHS(CURRENT_TIMESTAMP,6)) from SYSIBM.SYSDUMMY1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|