Here you can find the source of formatDateByYYYYMMDDHHmmss(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String formatDateByYYYYMMDDHHmmss(Date date)
//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); } }