Seeking a time, from the early hours of the day the number of milliseconds

  /**
     * Find a number of milliseconds from the time the morning of the day
     * @param date
     * @return
     * @throws ParseException
     */
    public static long getMillonTimes(String date) throws ParseException {
        long time = new Date(date).getTime();
        SimpleDateFormat sdfOne = new SimpleDateFormat("yyyy-MM-dd");
        long overTime = (time - (sdfOne.parse(sdfOne.format(time)).getTime()))/1000;
        return overTime;
    }

Guess you like

Origin www.cnblogs.com/prader6/p/12122583.html