File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes SimpleDateFormat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "SimpleDateFormat" Watch "SimpleDateFormat" New topic


Chris Stewart
Ranch Hand

Joined: Sep 14, 2002
Posts: 184
Does anyone know how I can find yesterdays date in SimpleDateFormat? Currently I use ("20" + "y" + "MM" + "dd") which would give me 20021018 for today. Does anyone know how I could have it give me 20021017 instead? Thanks in advance.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

p 144 "Java in a Netshell" 3rd edition (with a little mod)

Please ignore post, I have no idea what I am talking about.
I agree. Here's the link:
subject: SimpleDateFormat
It's not a secret anymore!