Java Parse Date Pattern YYYY parseHHMMSS(long time)

Here you can find the source of parseHHMMSS(long time)

Description

parse HHMMSS

License

Apache License

Declaration

public static String parseHHMMSS(long time) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Main {
    private static final SimpleDateFormat FORMAT_HHMMSS = new SimpleDateFormat("HH:mm:ss");
    private static final SimpleDateFormat FORMAT_YYYYMMDDHHMMSSLong = new SimpleDateFormat("yyyyMMddHHmmss");

    public static String parseHHMMSS(long time) {
        try {/*w w w  .  j a  v a  2s.  co  m*/
            return FORMAT_HHMMSS.format(FORMAT_YYYYMMDDHHMMSSLong.parse(String.valueOf(time)));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. parseFTPDate(String dateStr)
  2. parseFullDate(String paramName, String dateStr)
  3. parseFullTime(String str)
  4. parseGeneralizedTimeAsDate(String generalizedTime)
  5. parseHeaderDate(String headerValue)
  6. parseInsituFileNameDateFormat(String timeString)
  7. parseLastModifDate(final File file)
  8. parseLogstashDate(final String date_string)
  9. parsemm(String dateStr)