Here you can find the source of formatDate(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String formatDate(Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm"); /**/*ww w. j av a2 s .co m*/ * Converte de Data para String * @param date * @return */ public static String formatDate(Date date) { return sdf.format(date); } }