Date Formatting

Hello, Friends.I would like to format a date to bring it to YYYYMMDD format. It is quite easy with getDay(), getMonth(), getYear(), but since they are depricated, I tried to use DateFormat, but didn't success.Any ideas how to do that?Thanks.
[277 byte] By [seralex] at [2007-9-26 1:18:19]
# 1
Hi! Look at Q.120 in the Question of the Week archives. I've included some sample code in there.Hope this helps!Cheers!
amolk at 2007-6-29 0:49:12 > top of Java-index,Archived Forums,Java Programming...
# 2
java.text.SimpleDateFormat is what you needSimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");String dateString = format.format( date ); partha
parthasarkar at 2007-6-29 0:49:12 > top of Java-index,Archived Forums,Java Programming...
# 3
Thanks a lot friends!PS. Where is question of the week section?
seralex at 2007-6-29 0:49:12 > top of Java-index,Archived Forums,Java Programming...
# 4
Hi! Here's the link to the archives. http://developer.java.sun.com/developer/qow/archive/index.htmlCheers!
amolk at 2007-6-29 0:49:12 > top of Java-index,Archived Forums,Java Programming...