Android Long to Date Convert getDateTimeLabel(long time)

Here you can find the source of getDateTimeLabel(long time)

Description

get Date Time Label

License

Open Source License

Declaration

public static String getDateTimeLabel(long time) 

Method Source Code

//package com.java2s;

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

public class Main {
    private static String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm";

    public static String getDateTimeLabel(long time) {
        SimpleDateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
        return formatter.format(new Date(time));
    }/*from w w w.ja  va2s  .co m*/
}

Related

  1. getDateString(long date, int style, Locale locale)
  2. getDateString(long time)
  3. getDateTime(long microsecond)
  4. getDateTime(long microsecond)
  5. getDateTimeForTimeZone(Long time)
  6. getDateTimeString(long dateTime)
  7. getDateWeekLabel(long date)
  8. getDay(long dateTimeMillis)
  9. getDayOfWeek(long timeMillis)