特色栏目

ASP源码

PHP源码

.NET源码

JSP源码

游戏频道
专题合集
关闭菜单
首页> JSP教程> JSP取当前日期

JSP取当前日期

时间:2009-07-03 17:04:13 作者:互联网

2.

<%
ja***text.SimpleDateFormat formatter = new ja***text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

ja***util.Date currentTime = new ja***util.Date();//得到当前系统时间

String str_date1 = fo***tter.format(currentTime); //将日期时间格式化
String str_date2 = cu***ntTime.toString(); //将Date型日期时间转换成字符串形式
%>

相关文章 最新文章

相关应用

热门文章

猜你喜欢

返回顶部