- public class bb {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
- String dateString = "20071128175545";
- try {
- Date date = df.parse(dateString);
- System.out.println(df.format(date));
- } catch (Exception ex) {
- System.out.println(ex.getMessage());
- }
- }
- }
- public class bb {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
- String dateString = "20071128175545";
- try {
- Date date = df.parse(dateString);
- System.out.println(df.format(date));
- } catch (Exception ex) {
- System.out.println(ex.getMessage());
- }
- }
- }