如何更新每次在消息列表视图中的textview中的日期和时间

时间:2013-05-15 09:01:49

标签: textview android

GregorianCalendar calCreationDate = new GregorianCalendar(); 

int intMilli = calCreationDate.get(Calendar.MILLISECOND); 

int intSeconds = calCreationDate.get(Calendar.SECOND); 

calCreationDate.add(Calendar.MILLISECOND, (-1*intMilli)); 

calCreationDate.add(Calendar.SECOND, -1*intSeconds); 

calCreationDate.add(Calendar.MINUTE, 1); 


Date dateStartDate = calCreationDate.getTime();

String time =dateStartDate.toString();

0 个答案:

没有答案