Java examples for java.util:Millisecond
convert Milli Seconds To Full Date
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.TimeZone; public class Main { public static TimeZone timezone = TimeZone.getTimeZone("GMT+0"); public static String convertMilliSecondsToFullDate(double milliSeconds) { // Create a DateFormatter object for displaying date in specified format. DateFormat formatter = new SimpleDateFormat( "MM/dd/yyyy hh:mm:ss.SSS"); formatter.setTimeZone(timezone); // Create a calendar object that will convert the date and time value in milliseconds to date. Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis((long) milliSeconds); return formatter.format(calendar.getTime()); }/*from w w w. j av a 2s. c o m*/ }