Reputation: 169
i would like to convert a date from android provider call log. The actual date is 1341238489840.
int _DATE = calls.getColumnIndex(android.provider.CallLog.Calls.DATE);
String date = calls.getString(_DATE);
Upvotes: 0
Views: 448
Reputation: 1939
You can you this code i have tested it
public class CDate {
public static void main(String[] args) {
Date date = new Date(1341238489840L);
System.out.println(new SimpleDateFormat("dd:MM:yyyy", Locale.ENGLISH)
.format(date));
}
}
Upvotes: 0
Reputation: 94645
Use SimpleDateFormat
to format the date.
Date dt=new Date(1341238489840L);
Upvotes: 1