Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
| Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 19th, 2004, 08:16 PM
Authorized User
Join Date: Jul 2004
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Regornil
Default Getting the current month

hey guys..i need to know how to get the current month in jsp..as well as how do i get the month from a time stamp.Pls tell me of the classes that need to be imported as well..if there is any.Really appreciate ur help. =]

  #2 (permalink)  
Old July 19th, 2004, 09:01 PM
Authorized User
Join Date: Jul 2003
Location: kl, kl, Malaysia.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yuji_chen

u can use the calendar class provided by sun.
This should do wat u want,
            Calendar cal = Calendar.getInstance();
            int iYear = cal.get(Calendar.YEAR);
            int iMonth = cal.get(Calendar.MONTH)+1;
            int iDate= cal.get(Calendar.DAY_OF_MONTH);


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
get current month cathiec SQL Language 2 February 23rd, 2006 09:58 AM
Veiw Reports only for current month. Dharam80 Access 54 September 30th, 2005 04:59 PM
how to name worksheet by Month yylee Excel VBA 2 April 10th, 2004 01:01 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.