Java时间如何改写为长尾词?
- 内容介绍
- 文章标签
- 相关推荐
本文共计83个文字,预计阅读时间需要1分钟。
javaprivate synchronized static String getTransFileDateTime() { SimpleDateFormat sdfTime=new SimpleDateFormat(yyyyMMddHHmmss); return sdfTime.format(System.currentTimeMillis());}
private synchronized static String getTransFileDateTime() {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
long time = System.currentTimeMillis();
SimpleDateFormat sdfTimeb = new SimpleDateFormat("yyyyMMddHHmmssSS");
Date d = new Date(time);
String formatStr = sdfTimeb.format(d);
return formatStr;
}
本文共计83个文字,预计阅读时间需要1分钟。
javaprivate synchronized static String getTransFileDateTime() { SimpleDateFormat sdfTime=new SimpleDateFormat(yyyyMMddHHmmss); return sdfTime.format(System.currentTimeMillis());}
private synchronized static String getTransFileDateTime() {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
long time = System.currentTimeMillis();
SimpleDateFormat sdfTimeb = new SimpleDateFormat("yyyyMMddHHmmssSS");
Date d = new Date(time);
String formatStr = sdfTimeb.format(d);
return formatStr;
}

