Java tutorial
//package com.java2s; import java.util.Date; public class Main { public static String formatDate(Date d) { // TODO let user pick date format preferences ( - or - consult system settings? ) String s = (1900 + d.getYear()) + "/" + (d.getMonth() + 1) + "/" + (d.getDate()); return s; } }