站长资源网络编程

关于在Servelet中如何获取当前时间的操作方法

整理:jimmy2026/8/3浏览2
简介关于在Servelet中如何获取当前时间的操作方法//获取到当前时间Date date=new Date();DateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");String time=format.format(date);

关于在Servelet中如何获取当前时间的操作方法

//获取到当前时间
Date date=new Date();
	DateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	String time=format.format(date);

以上就是小编为大家带来的关于在Servelet中如何获取当前时间的操作方法全部内容了,希望大家多多支持~