If I have a method like this:
public static String convertDateTimeToString(DateTime dt) {
return dt.getDate() + " " + dt.getTime();
}
Which takes a DateTime object of my own which contains a java.sql.Date and a java.sql.Time, what is the best way of reversing the process so that I can substring a java.sql.Date and a java.sql.Time from a String?
Or if DateTime dt is a JodaTime DateTime object?
If this can be done without reference to java.util.Date.