Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getCurrentDate() { Calendar calander = Calendar.getInstance(); SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy"); String date = df.format(calander.getTime()); return date; } }