ASP 日期时间格式化函数(For VBScript )
<%@LANGUAGE="VBSCRIPT " CODEPAGE="936"%>
<% Option Explicit %>
<style type="text/css">
* {
margin:10px;
line-height:180%
}
.font {
FONT-SIZE:14px;
font-weight:bold;
COLOR:#FD0101;
FONT-FAMILY:Georgia;
}
</style>
<%
'函数调用示例:
Response.Write FormatTime(Now(),"{Y}-{M}-{D} {H}:{N}:{S}") & "<br>"
Response.Write FormatTime(Now(),"{Y}年{M}月{D}日 {H}时{N}分{S}秒") & "<br>"
Response.Write FormatTime(Now(),"{w},{D} {Me} {Y}") & "<br>"
Response.Write ("<font class=""font"">"&FormatTime(Now(),"{w},{Y}-{M}-{D}")&"</font>")
'==================================================================
'函数:FormatTime
'功能:日期时间格式化
'参数:DateTime,日期时间
'Template,格式化模板
'返回:格式化后的字串
'备注:模板标签注释
' {Y}:年
' {y}:2位年
' {M}:月
' {m}:补位月,例:01,02
' {ME}:英文月份
' {Me}:英文月份缩写
' {D}:日
' {d}:补位日
' {H}:时
' {h}:补位时
' {N}:分
' {n}:补位分
' {S}:秒
' {s}:补位秒
' {W}:星期几英文
' {w}:星期几英文缩写
'==================================================================
最新评论
强大!
The purchases I make...
At last! Somonee who...
Good job mkanig it a...
How neat! Is it real...
Unparalleled accurac...
Thanky Thanky for al...
That's an inenguios ...
Holy szhinit, this i...
If you wrote an atri...