SimpleDateFormat

来源:互联网 发布:贵州省大数据产业发展 编辑:程序博客网 时间:2024/04/28 13:44


30/May/2013:17:38:20日期转2013:05:30 17:38:20

Str="30/May/2013:17:38:20";

DateFormat srcFormat= new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss",Locale.ENGLISH);

DateFormat targetFormat=new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");

time = targetFormat.format(srcFormat.parse(Str)

0 0
原创粉丝点击