怎样读取一个文件 的日期?

newman0708 newman0708 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Calendar tempDate = Calendar.getInstance() ;//new GregorianCalendar(); tempDate.setTimeInMillis(a[i].lastModified());
//tempDate.setTime(new Date(a[i].lastModified()));
String monthFile = ""+(tempDate.get(Calendar.MONTH)+1);
String dayFile = ""+tempDate.get(Calendar.DAY_OF_MONTH);
String yearFile = ""+(tempDate.get(Calendar.YEAR)+1900);//-2000
String hourFile = ""+tempDate.get(Calendar.HOUR_OF_DAY);//24-hour clock
String minuteFile=""+tempDate.get(Calendar.MINUTE);

我用这个 出现 错误!
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
newman0708
Java SE 62,621 成员 307,251 内容