Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get current month in number.

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
Hi All,

In JSP

java.util.Date date = new java.util.Date();
<%= date %>

will give this:
Fri May 19 15:19:37 EDT 2006

How can I get the current month in number out of that?

Thanks.
 
I got it: java.util.Date().getMonth()

Thanks.
 
Hmmm... reading the API doc before asking a question .... priceless.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top