Java Timestamp Format timestampConvertToString(int timeStamp, String format)

Here you can find the source of timestampConvertToString(int timeStamp, String format)

Description

timestamp Convert To String

License

Open Source License

Declaration

public static final String timestampConvertToString(int timeStamp, String format) 

Method Source Code

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

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

public class Main {
    public static final String timestampConvertToString(int timeStamp, String format) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
        long lTime = Long.valueOf(timeStamp);
        return simpleDateFormat.format(new Date(lTime * 1000));
    }//  w w w  .  ja  v a  2 s.c om
}

Related

  1. timeStamp2Date(String seconds, String format)
  2. Timestamp2DDMMYYYY(java.sql.Timestamp ts)
  3. Timestamp2HHMMSS(java.sql.Timestamp ts, int iStyle)
  4. timestamp2String(long source, DateFormat format)
  5. Timestamp2UTC(Timestamp mytime)
  6. timeStampForFileName(final String simpleDateFormat)
  7. timestampFormat(Date date)
  8. timestampFormat(final Date date)
  9. timeStampFormat(Timestamp t)