安大互联
财经热点 > Asp编程 > Display - the - Time - Without - the - Second
【问题文章】Display - the - Time - Without - the - Second
浏览次数:【62】  发布日期:2009-8-13 12:09:22    文章分类: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
手机扫码浏览该文章
 ● 相关资讯推荐
 ● 相关资讯专题
  • 网络建设业务咨询

   TEl:13626712526