hey all,
does anyone know if there is some code which gets the current month in number form?
not its name
thanks
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
hey all,
does anyone know if there is some code which gets the current month in number form?
not its name
thanks
Use the Calendar get() method.
JavaN00b101 (February 8th, 2012)
thanks for that
You're welcome.
do u know how i could use the number of the current month i get to subtract it from one the user inputs? i tried some things but i cant figure it out
You appear to be asking, in effect, how to subtract. I feel the problem may be something else.
Post what you have tried. And describe what happened. If there is a compiler message you can't understand post the message and someone will help explain what it means.
If what you tried does compile but when you run it, it does not give you the result of the subtraction then describe what it *does* as well as what you expected it would do.