java时间格式转换 Thu Dec 24 17:33:00 GMT+08:00 2015 我想转

2025-02-22 07:03:50
推荐回答(1个)
回答1:

SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String str=df.format(date);