Java Long Number to Time convertLongTimeStampToString(long localTimeStamp)

Here you can find the source of convertLongTimeStampToString(long localTimeStamp)

Description

convert Long Time Stamp To String

License

Open Source License

Declaration

public static String convertLongTimeStampToString(long localTimeStamp) 

Method Source Code

//package com.java2s;
/**//ww  w . j av a 2  s . c  o m
 * Copyright (c) 2015 SK holdings Co., Ltd. All rights reserved.
 * This software is the confidential and proprietary information of SK holdings.
 * You shall not disclose such confidential information and shall use it only in
 * accordance with the terms of the license agreement you entered into with SK holdings.
 * (http://www.eclipse.org/legal/epl-v10.html)
 */

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String convertLongTimeStampToString(long localTimeStamp) {
        Date dateTimeStamp = new Date(localTimeStamp);

        String tempPattern = "yyyy-MM-dd a hh:mm"; //$NON-NLS-1$
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(tempPattern);

        String stringTimeStamp = simpleDateFormat.format(dateTimeStamp);

        return stringTimeStamp;
    }
}

Related

  1. addMinTime(long time, String addMin)
  2. calcTime(final long totalTime)
  3. convertLong2String(Long time, String format)
  4. convertLongDate(long lDate, String format)
  5. convertLongTimeToText(Long time)
  6. convertLongToTimestampString(String dateFormat, Long millSec)
  7. ConvertLongToTimeString(long lastModified)
  8. convertMillisToHHMMSS(long millis)