I used
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy, HH:mm");
String time = formatter.format(new Date());
to get the time (12.03.2012, 17:31), now i want to convert this time to milliseconds, because i have a file with a couple dates and text, and i want to convert the dates in milliseconds so that i cant add the text in inbox using
ContentValues values = new ContentValues();
values.put("address", "123");
values.put("body", "tekst");
values.put("read", 1);
values.put("date", HERE I MUST PUT A DATE IN MILLISECONDS);
context.getContentResolver().insert(Uri.parse("content://sms/inbox"), values);
Because i must put a time in milliseconds i must convert the time, does anyone know how?
Let's say I have a time 05.01.2011, 12:45
and want to convert it, how? I want to convert an old time that I have (not to get miliseconds from current time).