Java tutorial
import java.text.*; public class Test { public static void main(String args[]) { try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD"); System.out.println(sdf.parse(args[0]).toString()); } catch (Exception e) { e.printStackTrace(); } } }