Hey, I'm trying to get a date from CallLog.Calls on Android. I do like this:
import org.apache.http.impl.cookie.DateUtils;
import android.database.Cursor;
Cursor cursor = getContentResolver().query(
android.provider.CallLog.Calls.CONTENT_URI, null, null, null,
android.provider.CallLog.Calls.DATE + " DESC ");
int dateId = cursor.getColumnIndex(android.provider.CallLog.Calls.DATE);
String callDate = cursor.getString(dateId);
String dateString = DateUtils.formatDate(callDate);
But the method formatDatedoes not allow Stringas a parameter, it needs a parameter Date. I tried to make a throw, but I do not think it is right. So, does anyone have an idea how to do this?
Thank.
source
share