This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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