how to type a date with format dd-mm-yyyy c# code example
Example 1: date format in java
Locale locale = new Locale("en", "UK");
DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);
dateFormatSymbols.setWeekdays(new String[]{
"Unused",
"Sad Sunday",
"Manic Monday",
"Thriving Tuesday",
"Wet Wednesday",
"Total Thursday",
"Fat Friday",
"Super Saturday",
});
String pattern = "EEEEE MMMMM yyyy";
SimpleDateFormat simpleDateFormat =
new SimpleDateFormat(pattern, dateFormatSymbols);
String date = simpleDateFormat.format(new Date());
System.out.println(date);
Example 2: php change date format from d/m/y to y-m-d
$var = '20/04/2012';
$date = str_replace('/', '-', $var);
echo date('Y-m-d', strtotime($date));