Android Long to Date Convert stdDateFormat(long t)

Here you can find the source of stdDateFormat(long t)

Description

std Date Format

License

Open Source License

Declaration

public static String stdDateFormat(long t) 

Method Source Code

//package com.java2s;
/**/*from w w w.java 2s  .c  o  m*/
 * Android Micro Web Server
 * Copyright (C) 2011  ScR4tCh
 * Contact scr4tch@scr4tch.org

 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
 */

import java.text.SimpleDateFormat;

public class Main {
    private static SimpleDateFormat formatter = new SimpleDateFormat(
            "dd-MMM-yy HH:mm");

    public static String stdDateFormat(long t) {
        return formatter.format(t);
    }
}

Related

  1. toDateFromTimestamp(long date)
  2. transMillionToTime(long milliseconds)
  3. transformDateTime(long t)
  4. millis2cal(long milliseconds, boolean clearTime)
  5. millisToString(long l)
  6. formatElapsedTime(long totalTimeSeconds)
  7. formatSecondsToHHMM(long seconds)
  8. getStringByFormat(long milliseconds, String format)
  9. getStringByFormat(long milliseconds, String format)