ConvertSQLDateToUTC
Aus Programmers Guide
public static String convertDateTime(String dateTime) { // from 2007-11-19 00:00:00 // to 19.11.2007 try { String[] dateString = dateTime.split(" "); String[] dateSplit = dateString[0].split("-"); int tag = Integer.parseInt(dateSplit[2]); int mon = Integer.parseInt(dateSplit[1]); int yea = Integer.parseInt(dateSplit[0]); return tag + "." + mon + "." + yea; } catch (Exception ex) { System.err.println("Fehler beim Umwandeln des Datums"); return dateTime; } }