Java Second Format parseLongToString(long millsSeconds)

Here you can find the source of parseLongToString(long millsSeconds)

Description

parse Long To String

License

Apache License

Declaration

public static String parseLongToString(long millsSeconds) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String yyyyMMddHH = "yyyyMMddHH";

    public static String parseLongToString(long millsSeconds) {
        SimpleDateFormat df = new SimpleDateFormat(yyyyMMddHH);
        Date date = new Date(millsSeconds);
        return df.format(date);
    }/* w  w  w  . java 2s  .com*/

    public static String parseLongToString(long millsSeconds, String format) {
        SimpleDateFormat df = new SimpleDateFormat(format);
        Date date = new Date(millsSeconds);
        return df.format(date);
    }
}

Related

  1. getStringFromNanoSeconds(final long nanoSeconds, final long format)
  2. getThisSecondTime()
  3. getTimeSecondInteger(Date date)
  4. getToSecond()
  5. humanDateToSeconds(String date)
  6. parseNoSecondFormat(String sDate)
  7. printElapsedSeconds(long start)
  8. removeSecondsFromDateString(String sdate)
  9. Second2DateString(int v)