Android Long to Date Convert longToSqlDateFormat(long date)

Here you can find the source of longToSqlDateFormat(long date)

Description

long To Sql Date Format

Declaration

public static String longToSqlDateFormat(long date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public final static String SQL_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static String longToSqlDateFormat(long date) {
        Date d = new Date(date);
        SimpleDateFormat dateFormat = new SimpleDateFormat(SQL_DATE_FORMAT);
        return dateFormat.format(d);
    }/*from   w w  w .  j  a  va 2 s  . c  om*/
}

Related

  1. isYesterday(long date)
  2. isYesterday(long date)
  3. longTimeToDate(long miliseconds)
  4. longTimeToString(int i)
  5. longToCalendar(Long time)
  6. millisToLongDHMS(long duration)
  7. millisToShortDHMS(long duration)
  8. nextDate(long timeMilliSeconds)
  9. parseMills2Time(long elapsedMills)