Simple Date format
import java.text.DateFormat; import java.util.Calendar; import java.util.Date; public class DateTimeEditor1 { public static void main(String[] args) { DateFormat m_format; Calendar m_calendar = Calendar.getInstance(); Date date = new Date(); String myString = DateFormat.getDateInstance().format(date); System.out.println(myString); } }