• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in incrementing date

 
harsimran kochar
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the code


the problem is that it is not incrementing month
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The format string in line 9 that you are using to create a SimpleDateFormat is wrong. It should be "dd-MM-yyyy". Note that "mm" means minutes; "MM" means months.
 
Martin Vajsar
Sheriff
Pie
Posts: 3747
62
Chrome Netbeans IDE Oracle
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The other issue is that you probably want to use add instead of roll. See javadoc for the difference between the two.
 
harsimran kochar
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic