Java Date Format As formatDateByYYYYMMDDHHmmss(Date date)

Here you can find the source of formatDateByYYYYMMDDHHmmss(Date date)

Description

This method is used for formatting date to yyyyMMddHHmmss

License

Open Source License

Parameter

Parameter Description
date a parameter

Declaration

public static String formatDateByYYYYMMDDHHmmss(Date date) 

Method Source Code

//package com.java2s;
/**/*ww w  .  jav a 2 s . c o  m*/
 * Copyright (C) 2013 Company. All Rights Reserved. 
 * 
 * This software is the proprietary information of Company . 
 * Use is subjected to license terms. 
 *
 * @since Jul 17, 2013 11:48:25 PM
 * @author SPA
    
 *
 */

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**
     * This method is used for formatting date to yyyyMMddHHmmss
     * 
     * @param date
     * @return
     */
    public static String formatDateByYYYYMMDDHHmmss(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat();
        sdf.applyPattern("yyyyMMddHHmmss");
        return sdf.format(date);
    }
}

Related

  1. formatDateAppello(Date data)
  2. formatDateAsFileSystemName()
  3. formatDateAsYYYYMMDD(Date date)
  4. formatDateBdChar(Date birthdate)
  5. formatDateByDefault(Date date)
  6. formatDateCkan(Date date)
  7. formatDateDashes(Date oDate)
  8. formatDateDay(final Date date)
  9. formatDateForCompleteInfo(Date date)