//需要转换的时间
String time = "01:00:00";
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
//先后去当天年月日
String format = simpleDateFormat1.format(Calendar.getInstance().getTime());
//年月日拼接时间,注意中间有个空格
format = format + " " + time;
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//转为Date
Date parseDate = simpleDateFormat2.parse(format);
Long parseTime = parseDate.getTime();
System.out.println(parseTime);
07-08
6427
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)