Java Long Number to Time formatTime(long date)

Here you can find the source of formatTime(long date)

Description

format Time

License

Apache License

Declaration

public static String formatTime(long date) 

Method Source Code

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

import java.text.SimpleDateFormat;

public class Main {

    public static String formatTime(long date) {
        SimpleDateFormat formatter = new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss SSSS");
        System.out.println(formatter.format(date));
        return formatter.format(date);
    }/*  w w  w. j  ava2s.c o  m*/
}

Related

  1. createCookie(String name, String value, String path, String domain, long stateTimeToLive)
  2. createFileDateTimeString(final Long ms)
  3. elapsedTime(long start, long end)
  4. elapsedTimeToString(long elapsedTime)
  5. formattaData(long date)
  6. formatTime(long ms)
  7. formatTimestampLong(long timestamp, String datepattern, TimeZone tz)
  8. formatToUTC(long datetime)
  9. formatXSDateTime(long lastModified)