A couple ideas come to mind:
1). Have a whole bunch of SimpleDateFormats -- one for each expected input format.
Set up a series of regexes and compare the input string to them to see which SimpleDateFormat to use.
2). Write your own DateFormat that ignores all non-digit characters. It would then translate the string as described. Thus, 12/25/04 12.25.04, 12-25-04, 122504, 12-25-2004, etc., would all be translated the same way.
I wrote the following
Java version of option 2 several years ago (it was based on an some Objective-C code that was used to do the same thing)
Please note that this is not the whole class, just the sample methods.
[ September 23, 2003: Message edited by: Joel McNary ]