Well,
Anoop and Gast gave you the answer, you can also use
Calendar
static
field as Gast said like JANUARY, FEBRUARY... DECEMBER to
compare
the
month information.
-----Original Message-----
From: Rizwan Ahmed [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 29, 2001 4:22 PM
To: [EMAIL PROTECTED]
Subject: Re: how to get Date,Month... from dateWayan
Why am I getting (current) month as 9 instead of 10.
Do I have to add 1 to the month?.
Thanks again
Rizwan
Wayan
that's it.
thanks much
Regards
Rizwan
Hi,
I think because you have these two import statements in your code,
java.sql.* and java.util.*, (or maybe other packages that have a Date class)
these both package have the Date class, so just use java.util.Date as the
object reference type instead of Date.
regards,
wayan
