问问题
12210 次
2 回答
1
I believe your following statements are creating error,
startDates.add(getDate(Long.parseLong(cursor.getString(3))));
endDates.add(getDate(Long.parseLong(cursor.getString(4))));
Just change them as following and try again.
startDates.add(getDate(Long.parseLong(cursor.getString(3).trim())));
endDates.add(getDate(Long.parseLong(cursor.getString(4).trim())));
Your field might contain a white space which you need to remove before converting them in to Long Data type.
于 2013-07-17T08:21:20.970 回答
0
Use
startDates.add(getDate(cursor.getLong(3)));
endDates.add(getDate(cursor.getLong(4)));
instead of
startDates.add(getDate(Long.parseLong(cursor.getString(3))));
endDates.add(getDate(Long.parseLong(cursor.getString(4))));
于 2015-04-20T19:15:18.627 回答