Java Hour Format formatDateTime(java.util.Date paramDate)

Here you can find the source of formatDateTime(java.util.Date paramDate)

Description

format Date Time

License

Open Source License

Declaration

public static String formatDateTime(java.util.Date paramDate) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {
    public static String formatDateTime(java.util.Date paramDate) {
        if (paramDate == null)
            return null;
        SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        localSimpleDateFormat.setLenient(false);
        return localSimpleDateFormat.format(paramDate);
    }/* ww  w.  ja v  a  2s  .co  m*/
}

Related

  1. formatDateTime(final Date dat)
  2. formatDateTime(final Date date)
  3. formatDateTime(java.util.Date d)
  4. formatDateTime(java.util.Date date)
  5. formatDateTime(java.util.Date date)
  6. formatDateTime(String date)
  7. FormatDateTime(String dateString)
  8. formatDateTime(String dateTime)
  9. formatDateTime(String strDateTime, String strFormat)