Convert string to date and store in sqlite in Android

I have date like this in string datatype from server 2012-09-25 12:44:50.000. How can i change into date and store in sqlite in android....

I have tried like this...

String ackwardDate="2012-09-25 12:44:50.000";
Calendar calendar = Calendar.getInstance();
String ackwardRipOff = ackwardDate.replace("/Date(", "").replace(")/", "");
Long timeInMillis = Long.valueOf(ackwardRipOff);

but i am getting Invalid Long : "2012-10-30T03:12:53.827"

 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

Date date1 =  sdf.parse("2012-09-25 12:44:50.000");

long millisec = date1.getTime();