@Test
public void testFormat(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
Date date = new Date();
String dataStr = sdf.format(date);
System.out.println(dataStr);
}
@Test
public void testFormat(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
Date date = new Date();
String dataStr = sdf.format(date);
System.out.println(dataStr);
}
转载于:https://www.cnblogs.com/ls00/p/6930605.html