Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static Date formatDateDayFirst(String date) { try { return new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault()).parse(date.replace("/", "-")); } catch (Exception e) { return null; } } }