This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Saswat, If you have a date/calendar object, you can call get(Calendar.MONTH) and get(Calendar.YEAR) to get these fields. If your value is stored in a date/time field in db2, you can use resultSet.getDate() to get a Date object right away.
If it really is stored as a char/varchar in the format "YYYY/MM/DD", you will need to call SimpleDateFormat to create a date first.