Android Long to Date Convert format(String pattern, long timeInMillis)

Here you can find the source of format(String pattern, long timeInMillis)

Description

format

Declaration

private static String format(String pattern, long timeInMillis) 

Method Source Code

//package com.java2s;

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

public class Main {
    private static String format(String pattern, long timeInMillis) {
        final SimpleDateFormat sdf = new SimpleDateFormat(pattern);
        return sdf.format(new Date(timeInMillis));
    }/*from  www  .ja  v  a  2 s.  co m*/
}

Related

  1. formatTime(long timeInMillis)
  2. formatDate(long timeInMillis)
  3. getCurrentDate(long time)
  4. changeMillisToFormat(long milliseconds, String pattern)
  5. convertLongToDateString(long mills, String format)
  6. formatDateD(Context paramContext, long paramLong)
  7. formatTimeStampString(Context context, long when, boolean fullFormat)
  8. getDatesStartingFromToWithInterval( long startDate, long endDate, int dayInterval)
  9. getFormatDateString(String format, long date)