Java Millisecond Convert getTimeString(long timelnMillis)

Here you can find the source of getTimeString(long timelnMillis)

Description

get Time String

License

Apache License

Declaration

public static String getTimeString(long timelnMillis) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static String getTimeString(long timelnMillis) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(timelnMillis);
        Date date = calendar.getTime();
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
        String newTypeDate = f.format(date);
        return newTypeDate;
    }/*  ww w .ja v  a  2  s . c o m*/
}

Related

  1. getTimeMillis(String time)
  2. getTimestamp(long milliseconds)
  3. getTimestampMillis(Locale locale)
  4. getTimeStr(final long millis)
  5. getTimeString(long millis)
  6. getTimeTakenAsSecondsString(long timeTakenMillis)
  7. millisecondConvertToStringTime(final long milliseconds)
  8. millisecondsToDateTime(long timeMillis)
  9. millisecondsToDays(long p_timeInMilliseconds, long p_secondsInDay)