applekanna
asked on
CAlendar in java
HI
Calendar c = Calendar.getInstance();
System.out.println("month and year is " + c.MONTH+ " "+c.YEAR );
gives me
month and year is 2 1
y?
Thx
Calendar c = Calendar.getInstance();
System.out.println("month and year is " + c.MONTH+ " "+c.YEAR );
gives me
month and year is 2 1
y?
Thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Watch out for the strange thing about months. They're numbered 0 .. 11 (not 1 .. 12) ;-)
> I want toget 11 and 2003
System.out.println("month and year is " + (c.get(Calendar.MONTH)+1)+ " "+c.get(Calendar.YEAR) );
System.out.println("month and year is " + (c.get(Calendar.MONTH)+1)+
ASKER
Thx for you qwik help
;-)
8-)
ASKER