language: Java7 (sun-jdk-1.7.0_10)
date: 234 days 7 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Locale;
 
/* The class name doesn't have to be Main, as long as the class is not public. */
class Main
{
  public static void main (String[] args) throws java.lang.Exception
  {
     System.out.println(new SimpleDateFormat("MMM dd HH:mm:ss YYYY", Locale.ENGLISH).parse("Sep 26 19:00:32 2012"));
  }
}