just one line code to get simple Date format :
SimpleDateFormat.getDateInstance().format(Date())
output : 18-May-2020
SimpleDateFormat.getDateTimeInstance().format(Date())
output : 18-May-2020 11:00:39 AM
SimpleDateFormat.getTimeInstance().format(Date())
output : 11:00:39 AM
Hope this answer is enough to get this Date and Time Format ... :)