This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get date in YYYYMMDD format  RSS feed

 
shama parween
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

In whatever the format we enter the date, it should check if its a valid date and should return in YYYYMMDD format without any spaces,slash aur hyphen.
Please help me with this.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15861
81
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use class SimpleDateFormat to format your Date object into a string with the desired format. See the API documentation of class SimpleDateFormat to find out how to do it exactly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!