Java Time Format printFormatDate(long dateTime)

Here you can find the source of printFormatDate(long dateTime)

Description

print Format Date

License

Apache License

Parameter

Parameter Description
dateTime a parameter

Declaration

public static String printFormatDate(long dateTime) 

Method Source Code

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

import java.text.SimpleDateFormat;

public class Main {
    /**// w ww.j a v  a  2  s.c  o m
     *
     * @param dateTime
     * @return
     */
    public static String printFormatDate(long dateTime) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.").format(dateTime / 1000)
                + String.format("%06d", dateTime % 1000000);
    }
}

Related

  1. long2Datestr(long time, String format)
  2. long2String(long longTime, String dataFormat)
  3. long2String(long longTime, String dataFormat)
  4. newDateTimeFormat()
  5. printDate(final long time, final String dateFormat)
  6. setDateTimeFormat(String format)
  7. stdTimeFormat(Date date)
  8. string2Long(String sourceTime, String dataFormat)
  9. string2long(String sourceTime, String dataFormat)