Here you can find the source of dateFormat(Date date)
public static String dateFormat(Date date)
//package com.java2s; /*L//from w ww. java 2 s. com * Copyright SAIC, Ellumen and RSNA (CTP) * * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details. */ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** * Format a Date object into a string format for a day that * meets submission report standard. */ public static String dateFormat(Date date) { DateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); return sdf.format(date); } }