Java tutorial
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.GregorianCalendar; import java.util.Locale; public class Main { private static SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy", Locale.ITALIAN); public static String getStringFromCal(GregorianCalendar cal) { return cal != null ? dateFormat.format(cal.getTime()) : null; } }