JAVA时间格式化处理

JAVA时间格式化处理
日期格式化
import java.util.Date; 
import java.text.SimpleDateFormat; 
class dayTime1 

public static void main(String args[]) 

Date nowTime=new Date(); 
System.out.println(nowTime); 
SimpleDateFormat time=new SimpleDateFormat("yyyy MM dd HH mm ss"); 
System.out.println(time.format(nowTime)); 

}

猜你喜欢

转载自www.cnblogs.com/pingchangren/p/9121117.html