Here you can find the source of convertDate(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String convertDate(Date date)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/*from www. j av a 2 s.c o m*/ * Convert data to string with pattern (dd/MM). * @param date * @return */ public static String convertDate(Date date) { DateFormat format = new SimpleDateFormat("dd/MM"); return format.format(date); } }