package javaTest;
import java.text.SimpleDateFormat;
public class javaTest {
public static void main(String args[]) {
SimpleDateFormat nowDate = new SimpleDateFormat("yyyyMMdd HHmmss");
String strDateTime = nowDate.format(new java.util.Date());
String modidate = strDateTime.substring(0, 8);
String moditime = strDateTime.substring(9, 15);
System.out.println(" " + modidate + " " + moditime);
}
}
import java.text.SimpleDateFormat;
public class javaTest {
public static void main(String args[]) {
SimpleDateFormat nowDate = new SimpleDateFormat("yyyyMMdd HHmmss");
String strDateTime = nowDate.format(new java.util.Date());
String modidate = strDateTime.substring(0, 8);
String moditime = strDateTime.substring(9, 15);
System.out.println(" " + modidate + " " + moditime);
}
}