`
lisher
  • 浏览: 10491 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

android毫秒转化为时间

 
阅读更多

/**
*
* @Title:getDateData
* @Description:毫秒转成日期格式
* @param newsTime
*            时间
* @return
* @author lisher
*/
public static String getDate(String newsTime, String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format);
long newsDateL = (Long.parseLong(newsTime)) * 1000;
String newsDateS = sdf.format(new Date(newsDateL));
return newsDateS;
}
[/code
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics