Home > php教程 > PHP开发 > jsp output current time implementation code

jsp output current time implementation code

高洛峰
Release: 2016-12-29 15:42:35
Original
1637 people have browsed it

Output the complete time in the jsp page, the format is "Year Month Day Hour: Minute: Second"

<% Date date = new Date(); 
 SimpleDateFormat t = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 String time = t.format(date);
%>
当前时间:<%= time %>
Copy after login

jsp output current time implementation code

The above is the jsp brought by the editor for everyone The entire implementation code for outputting the current time is complete. I hope everyone will support the PHP Chinese website~

For more articles related to the implementation code for jsp outputting the current time, please pay attention to the PHP Chinese website!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template