html5中文学习网

您的位置: 首页 > 网络编程 > ASP编程 » 正文

Display the Time Without the Second_ASP教程_编程技术

[ ] 已经帮助:人解决问题
The built in ASP time object returns the time in the format of HH:MM:SS AM/PM (i.e., 11:10:52 AM). Often times, you don't want to show the seconds, you just want to show HH:MM AM/PM. Now it can be done!

The Code:
<%
DT = time()
Length = LEN(DT)
TheTime = LEFT(DT, Length - 6)
AMPM = RIGHT(DT, 2)
DT = TheTime + AMPM
Response.Write DT
%>

The Result:
11:10 AM
FxFHTML5中文学习网 - HTML5先行者学习网
FxFHTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助