Java tutorial
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** * @param date * @return */ public static String convertDateToString(Date date) { String dateStr = null; DateFormat formatter = new SimpleDateFormat(); dateStr = formatter.format(date); return dateStr; } }