Java Timestamp Parse parseTimestamp(Long time, String pattern)

Here you can find the source of parseTimestamp(Long time, String pattern)

Description

parse Timestamp

License

Open Source License

Declaration

public static String parseTimestamp(Long time, String pattern) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {

    public static String parseTimestamp(Long time, String pattern) {
        String dateStr = "";
        if (time != 0) {
            SimpleDateFormat sdf = new SimpleDateFormat(pattern);
            Date date = new Date(time);
            dateStr = sdf.format(date);/*from  www  .ja  va2 s.  c o  m*/
        }
        return dateStr;
    }
}

Related

  1. parseTimestamp(Date date)
  2. parseTimestamp(Date date)
  3. parseTimestamp(final String format, final String time)
  4. parseTimestamp(final String s)
  5. parseTimeStamp(final String... key)
  6. parseTimestamp(Object o)
  7. parseTimestamp(String d)
  8. parseTimestamp(String date)
  9. parseTimestamp(String dateStr, String format)