I\'m trying to convert the following string \"2012-04-13 04:08:42.794\" to a date type:
\"2012-04-13 04:08:42.794\"
SimpleDateFormat dateFormat = new SimpleDateFormat(\
Calendar now = Calendar.getInstance(); System.out.println("Current milliseconds since Jan 1, 1970 are :" + now.getTimeInMillis());
just use java.util.Calendar http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html