SyntaxFix
Write A Post
Hire A Developer
Questions
try this
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); String string = dateFormat.format(new Date()); System.out.println(string);
you can create any format see this