Android Long to Date Convert getTimeLabel(long time)

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

Description

Returns label for the time.

Parameter

Parameter Description
time the time to return label for.

Return

label for the time.

Declaration

public static String getTimeLabel(long time) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private final static SimpleDateFormat formatter = new SimpleDateFormat(
            "dd/HH:mm:ss");

    /**//from   www  .  ja va  2 s .c  o m
     * Returns label for the time.
     * 
     * @param time
     *            the time to return label for.
     * @return label for the time.
     */
    public static String getTimeLabel(long time) {
        return formatter.format(new Date(time));
    }
}

Related

  1. getStandardTime(long timestamp)
  2. getStartTimeOfDay(long timeInLong)
  3. getStringOfLong(long date)
  4. getTimeInterval(long interval)
  5. getTimeLabel(long date)
  6. getTimestampDatetime(long milliseconds)
  7. getUTCTimeFromElapsedTime(long elapsedTime)
  8. getUTCTimeFromLocalMillis(long localMillis)
  9. getUTCandRelativeDateFromElapsedTime( long elapsedTime)