Java Timestamp Format formatTimestamp(long ts)

Here you can find the source of formatTimestamp(long ts)

Description

format Timestamp

License

Apache License

Declaration

public static String formatTimestamp(long ts) 

Method Source Code


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

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

public class Main {
    public static String formatTimestamp(long ts) {
        return new SimpleDateFormat("HH:mm:ss.SSS", Locale.ROOT).format(new Date(ts));
    }//w w w  . j ava2s .co m
}

Related

  1. formatTimestamp(long timestamp)
  2. formatTimestamp(long timestamp)
  3. formatTimestamp(long timestamp)
  4. formatTimestamp(long timestamp)
  5. formatTimestamp(long timestamp)
  6. formatTimestamp(String dateStr, String granularity)
  7. formatTimestamp(Timestamp dataHora)
  8. formatTimeStamp(Timestamp t)
  9. formatTimestamp(Timestamp t, int type)