Converting selectedDate to YYYYMMDD-format

Im trying to use the DateChooser. You can get the date by using “selectedDate”-function, but the format is so screwed up that I cant use it. Looks like this:

Wed Jan 12 00:00:00 GMT+0100 2005

Is there a quick way to turn this string into a string with “YYYYMMDD”-format (ie. “20050123”)?

Ive looked trough the help-files to see if the DateChooser-class has any quick-conversion functions, but I cant find any…