java怎样将string时间戳转换为date

1首先把字符串转成标准的时间格式:String time = "xxxxxxx";SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");String plan = sdf.format();2.再次转成Date sdf.parse(plan);
java怎样将string时间戳转换为date
1首先把字符串转成标准的时间格式:
String time = "xxxxxxx";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

String plan = sdf.format();
2.再次转成Date
sdf.parse(plan);2017-10-17
new Date(String时间戳);2017-10-17
mengvlog 阅读 56 次 更新于 2025-12-19 22:18:32 我来答关注问题0
檬味博客在线解答立即免费咨询

Java相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部