I'm kind of stuck on date and time.
I want my program to create the date like this "20121217". The first 4 letters are the year, the second 2 letters are the month and the last 2 are the day. year+month+day
The time is "112233" hour+minute+second
Thanks for your help!
That's a formatting issue. Java uses
java.text.SimpleDateFormat for those things.
DateFormat dateFormatter = new SimpleDateFormat("yyyyMMdd hhmmss"); dateFormatter.setLenient(false); Date today = new Date(); String s = dateFormatter.format(today);