Java Millisecond Convert getTimeString(long millis)

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

Description

get Time String

License

Apache License

Declaration

public static String getTimeString(long millis) 

Method Source Code

//package com.java2s;
/*   Copyright (C) 2013-2014 Computer Sciences Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. */

import java.text.SimpleDateFormat;

public class Main {
    private static SimpleDateFormat sdf;

    public static String getTimeString(long millis) {
        Date date = new Date(millis);
        return sdf.format(date);
    }/*from  w w w .  ja  va2s.c  om*/
}

Related

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