I need to convert this 20140815
into 15.08.2014 and into 15.08.2014 00:00:00
How do I do that, what opportunities are there in Java
You could use SimpleDateFormat as follows
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat outputFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
Date date = inputFormat.parse("20140815");
String result = outputFormat.format(date);
Locale (e.g. US English). Even though this particular format doesn't use any locale-specific symbols, it's a good habit to get into... and as there are time zones where midnight doesn't exist, you can get some weird behaviour that way if you're not careful, too.Why bother with Dates... just use Strings:
String output = input.replaceAll("(....)(..)(..)", "$3.$2.$1");
or
String output = input.replaceAll("(....)(..)(..)", "$3.$2.$1 00:00:00");
SimpleDateFormat...