| Author |
how to get date in YYYYMMDD format
|
shama parween
Greenhorn
Joined: Mar 25, 2008
Posts: 3
|
|
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
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
|
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.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: how to get date in YYYYMMDD format
|
|
|