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

jsp output current time implementation code

高洛峰
高洛峰Original
2016-12-29 15:42:351641browse

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 %>

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!


Statement:
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