Android Long to Date Convert convertLongToDateString(long mills, String format)

Here you can find the source of convertLongToDateString(long mills, String format)

Description

convert Long To Date String

Declaration

public static String convertLongToDateString(long mills, String format) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {
    public static String convertLongToDateString(long mills, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);

        String date = sdf.format(mills);

        return date;
    }//w  w  w.j  a va 2  s.  co  m
}

Related

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