Possible Duplicate:
how to convert java string to Date object
In my Java code I have input String like 05.10.2011
which I need to convert to milliseconds.
So:
String someDate = "05.10.2011";
I have to convert to match milliseconds format.
String someDate = "05.10.2011";
SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy");
Date date = sdf.parse(someDate);
System.out.println(date.getTime());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With