Ugly, but it works...
Code:
/** You will need to add this to your import statements **/
import java.util.*;
import java.util.Date;
/** Here are the Variables **/
java.util.Calendar gc;
java.util.Date curDate;
String strCurDate = null;
String fileDate = new String();
/** Here is the code **/
gc = GregorianCalendar.getInstance ( ); // Gets the current Calendar instance
curDate = gc.getTime ( ); // Gets the Date time part of gc
SimpleDateFormat sdf2 = new SimpleDateFormat ( "yyyyMMdd" ); //sets up the correct format for the date
long msCDate = curDate.getTime(); //Transforms the current date into miliseconds
long msYDate = msCDate - 86400000; // Subtracts off one days worth of miliseconds
java.util.Date yestDate = new java.util.Date (msYDate); //Transforms the miliseconds into a correect date
fileDate = sdf2.format ( yestDate ); //Changes the date into the correct date format