KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using the following code Calendar cal = Calendar.getInstance(); System.out.println("Before "+cal.getTime()); cal.set(Calendar.MONTH, 01); System.out.println("After "+cal.getTime()); the output is Before Thu Jan 31 10:07:34 IST 2013 After Sun Mar 03 10:07:34 IST 2013 for adding +1 to jan is giving mar month. may be it returning correct output if we add 30 days to present date. but i want to show feb month. can any body help me please..
Tags (comma-separated)
Save Edits
Cancel