java中关于日期和时间的操作

String addtime = "20100420161710";
       
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
 
            Date date = new Date(formatter.parse(addtime).getTime() + 11*60*1000);
            System.out.println(date);

你可能感兴趣的:(java)