This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Friends .. Iam having JSP form s and Iam having a field which contains That this is for this Month means January or feb .. I want to take this date using system date so that user should not fill wrong one ...It can come by default..that i know Select sysdate from dual..but the format I want is for monthly .. So pls tell me the way possible..Iam also trying ..that is something related to SQL decoding ..I guess.. bye and take care sandeep
1) <% Calendar cal = new GregorianCalendar(); cal.setTime( new java.util.Date() ); int curMon = 1+cal.get(Calendar.MONTH); /* it will give the value from 1 to 12 and then in the text field you can assign this val as default %> 2) if u r happy to use sql query then use select to_char(sysdate,'mm') from dual; This will give values like '01' to '12'. But I will recommend to use the first option. Cheers, Nikhil