• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

convert custom date format

 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
consider,

i have a input like

13/12/2008 (dd/mm/yyyy) or 13-12-2008,

I want to change the format to 12/13/2008 (mm/dd/yyyy) or 12-13-2008.

Is it possible? Is there any function available?

Please advise.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15369
40
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could parse the string with the input format, then format the resulting Date object with the output format. For example:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic