Here you can find the source of getFullTime(String format, Date date)
public static String getFullTime(String format, Date date)
//package com.java2s; /*/*from w ww. ja v a 2s . c om*/ * @(#)DateUtil.java 1.0 2004/03/15 * * Copyright 2001 - 2004 Bestech, Inc. All rights reserved. * This software is the proprietary information of Bestech, Inc. * Use is subject to license terms. */ import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getFullTime(String format, Date date) { //yyyyMMddHHmmssSSS //yyyy-MM-dd HH:mm:ss:SSS SimpleDateFormat dateFormat = new SimpleDateFormat(format); return dateFormat.format(date); } }