What is the simplest way to convert a date string in a given format to another format?
I can see how I can format todays date in any given way via the java.text.SimpleDateFormat
class but how do I get a specific date into this class when this date is formatted in a terribly non-standard way?
Here is the string that I get from an application:
Mon Sep 15 03:15:07 PDT 2003
What I need to convert it into is:
9/15/2003
Obviously I can pick the String apart via my own code but I'm wondering if that isn't exactly what all these date format classes were made for?
Thanks
Start Free Trial