diff --git a/CurrentTime.java b/CurrentTime.java new file mode 100644 index 0000000..e8689ee --- /dev/null +++ b/CurrentTime.java @@ -0,0 +1,16 @@ +package de.vimo; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class CurrentTime { + + public static void main(String[] args) { + + Date date = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss"); + String stringDate = simpleDateFormat.format(date); + + System.out.println(stringDate); + } +} \ No newline at end of file