Here you can find the source of printFormatDate(long dateTime)
Parameter | Description |
---|---|
dateTime | a parameter |
public static String printFormatDate(long dateTime)
//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); } }