Java Date Parse convertIntToDatePattern2(int date)

Here you can find the source of convertIntToDatePattern2(int date)

Description

convert Int To Date Pattern

License

Apache License

Declaration

public static String convertIntToDatePattern2(int date) 

Method Source Code

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

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

public class Main {
    public static String convertIntToDatePattern2(int date) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Long x = Long.valueOf(date) * 1000;
        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(x);//  w w w. ja v a  2 s .c o  m
        return dateFormat.format(c.getTime());
    }
}

Related

  1. convertDateFromString(String data)
  2. convertDateStringToDate(String dateString, String format)
  3. convertDateStringToDB(String date)
  4. convertDateStringToMilliseconds(String dateString)
  5. convertIntToDate(int date)
  6. convertLongToDate(final long time)
  7. convertStringToDate(String aMask, String strDate)
  8. convertStringToDate(String aMask, String strDate)
  9. convertStringToDate(String arg)