Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

date format

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

I want to check whether a string is in a valid date format or not ie(yyyy/MM/dd) form.How it is to be done in java.

Thanks
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With a little work you could write the code that does this yourself. However, the Java API provides two classes that may help: DateFormat and SimpleDateFormat. Check out these links for an explanation of the methods that are available for you to use.

Layne
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


ram.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic