Java long转date

     logger.info("接收的 shiftStartTime:" + shiftStartTime);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = new Date(Long.parseLong(shiftStartTime));
        shiftStartTime = sdf.format(date);
        logger.info("转换后的 shiftStartTime:" + shiftStartTime);

猜你喜欢

转载自www.cnblogs.com/wuyb123/p/10301290.html