Here you can find the source of formatDateNoTime(Date date)
Parameter | Description |
---|---|
date | The date. |
public static String formatDateNoTime(Date date)
//package com.java2s; /* Please see the license information at the end of this file. */ import java.util.*; import java.text.*; public class Main { /** Date formatter for dates in format e.g. 2/6/2002. */ static private final SimpleDateFormat dateFormatter2 = new SimpleDateFormat("M/d/yyyy"); /** Formats a date as (for example) "2/6/2002". *//from ww w. j ava2 s. c o m * @param date The date. * * @return The formatted date. */ public static String formatDateNoTime(Date date) { return dateFormatter2.format(date); } }