JAVA获取时间戳

public static String DateTime(){
Date date = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
return df.format(date);
}

posted on 2020-06-08 22:06  不可能被劝退的新手  阅读(265)  评论(0)    收藏  举报