Java String to Date longToDateString(long l)

Here you can find the source of longToDateString(long l)

Description

long To Date String

License

Open Source License

Declaration

public static String longToDateString(long l) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static String longToDateString(long l) {
        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(l);//  www  . j  a v  a  2  s.  com
        Date d = (Date) c.getTime();
        SimpleDateFormat format = new SimpleDateFormat("MMM-dd-yyyy");
        String time = format.format(d);
        return time;
    }
}

Related

  1. getStringToDateFull(String da)
  2. getStringToDateTime(String dateStr, String formatStr)
  3. getTodateString()
  4. humanDateToDate(String date)
  5. LongToDateString(long l)
  6. longToDateStringDefault(long time)
  7. numberToDate(String dateString)
  8. putTimeStr14ToDate(String dateTimeStr)
  9. putTimeStr19ToDate(String dateTimeStr19)