Bookmark Topic Watch Topic
  • New Topic

Capture month and year from user input date

 
Lalit Vora
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,

I am developing struts appication. I am displaying date in index.jsp as mm/dd/yyyy format. User can enter date in the same format. After Validation i am receiving date in mm/dd/yyyy from user. Now from mm/dd/yyyy i want to capture only month and year as i want to show data from mm/01/yyyy mm/dd/yyyy. Example if user input 10/12/2005 then i need to show data from 10/01/2005 to 10/12/2005 So i want to capture montha dn year what user enters. Can anyone guide me how to get month and year from user input date.

Thanks
Lalit
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate.
 
    Bookmark Topic Watch Topic
  • New Topic