I'm currently working on a JavaFX project and having issues while displaying current date in a text area. I set the date and time format by using the following code:
SimpleDateFormat Date = new SimpleDateFormat("dd/MM/yy hh/mm");
Date date = new Date();
For example, I want the current date and time to be displayed as 15/05/2021 15:03 but the textarea shows this:
SAT May 15 15:03:21 PDT 2021
Is there anyway to set date format to "dd/MM/yy hh/mm"?
*NOTE: I imported both java.text.SimpleDateFormat and java.util.Date.