Java Date Format convertDateToStringT(final Date date)

Here you can find the source of convertDateToStringT(final Date date)

Description

convert Date To String T

License

Open Source License

Declaration

public static String convertDateToStringT(final Date date) 

Method Source Code

//package com.java2s;
/*//w  ww.ja va2s . c  o  m
 * [y] hybris Platform
 * 
 * Copyright (c) 2000-2015 hybris AG
 * All rights reserved.
 * 
 * This software is the confidential and proprietary information of hybris
 * ("Confidential Information"). 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 hybris.
 */

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String convertDateToStringT(final Date date) {
        String dateString = null;
        dateString = date == null ? "" : new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss").format(date);
        return dateString;
    }
}

Related

  1. convertDateToString(Date date, String pattern)
  2. convertDateToString(Date date, String pattern)
  3. convertDateToString(Date date, String patternString, Locale locale)
  4. convertDateToString(Date dateObject, String dateFormat)
  5. convertDateToStringByFormat(Date date)
  6. convertDateToStringUI(Date data)
  7. convertDateToText(Date date)
  8. convertDateToUTC(Date date)
  9. convertDateToXSDString(Date date)