I'm formatting Date to String without symbols :,/,- using SimpleDateFormat, but it formats it strangely.
Here's my code :
public static String getFormatedDate(Date date, String format) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
return simpleDateFormat.format(date);
}
And I call it like this :
DateUtil.getFormatedDate(new Date(), "DDMMYYYYHHMMSS")
Return of the call is incorrect 2540920170909379 it should look like this 11092017093405 = 11/09/2017 09:34:05