Change Date Format

Ok here’s the deal, I’m working with Flash MX and wrote this script:


timeDataObj = new Date();
localtime = timeDataObj.getDate();
   if (localtime>= startdate && localtime<= enddate) {
	  placeholder.loadMovie(image);
   }else{
		 trace("error");
}

The variable “startdate” and “enddate” are coming from a XML file and are writen like: 04082005
Now I want timeDataObj.getDate(); getting formatted to the same format as I used in the XML file. can someone help me here?

PS. Excuse for the bad english :hugegrin: