ASP系列VB函数大全
ASP系列VB函数大全
ASP函数大全
ASP函数与VBSCRIPT类似,以下举一些常用的函数
Array()
函数返回一个数组
表达式 Array(list)
允许数据类型: 字符,数字均可
实例: <%
Dim myArray()
For i = 1 to 7
Redim Preserve myArray(i)
myArray(i) = WeekdayName(i)
Next
%>
返回结果: 建立了一个包含7个元素的数组myArray
myArray("Sunday","Monday", ... ... "Saturday"
CInt()
函数将一个表达式转化为数字类型
表达式 CInt(expression)
允许数据类型: 任何有效的字符均可
实例: <%
f = "234"
response.write cINT(f) + 2
%>
返回结果: 236
转化字符"234"为数字"234",如果字符串为空,则返回0值
CreateObject()
函数建立和返回一个已注册的ACTIVEX组件的实例。
表达式 CreateObject(objName)
允许数据类型: objName 是任何一个有效、已注册的ACTIVEX组件的名字.
实例: <%
Set con = Server.CreateObject("ADODB.Connection"
%>
CStr()
函数转化一个表达式为字符串.
表达式 CStr(expression)
允许数据类型: expression 是任何有效的表达式。
实例: <%
s = 3 + 2
response.write "The 返回结果 is: " & cStr(s)
%>
返回结果: 转化数字“5”为字符“5”。
Date()
函数返回当前系统日期.
表达式 Date()
允许数据类型: None.
实例: <%=Date%>
返回结果: 9/9/00
DateAdd()
函数返回一个被改变了的日期。
表达式 DateAdd(timeinterval,number,date)
允许数据类型:
timeinterval is the time interval to add;
number is amount of time intervals to add;
and date is the starting date.
实例: <%
currentDate = #9/9/00#
newDate = DateAdd("m",3,currentDate)
response.write newDate
%>
<%
currentDate = #12:34:45 PM#
newDate = DateAdd("h",3,currentDate)
response.write newDate
%>
返回结果: 9/9/00
3:34:45 PM
"m" = "month";
"d" = "day";
If currentDate is in time format then,
"h" = "hour";
"s" = "second";
DateDiff()
函数返回两个日期之间的差值 。
表达式 DateDiff(timeinterval,date1,date2 [, firstdayofweek [, firstweekofyear]])
允许数据类型: timeinterval 表示相隔时间的类型,如“M“表示“月”。
实例: <%
fromDate = #9/9/00#
toDate = #1/1/2000#
response.write "There are " & _
DateDiff("d",fromDate,t
q 季 n 月 d 日 w 星期 h 时 m 分 s 秒 ASP 日期和时间函数... ASP... ASP常用的库函数大全 15页 免费 ASP系列VB函数大全 30页 2下载券...
数学函数大全 3页 2财富值喜欢此文档的还喜欢 VB函数大全 26页 免费 VB字符串处理函数大全 13页 免费 ASP系列VB函数大全 30页 5财富值 VB函数大全_基本函数...
数 ASP 函数大全 1.函数 array() 功能:创建一个数组变量 格式:array(list) ... ASP常用的库函数大全 15页 免费 ASP系列VB函数大全 30页 2下载券...
就算加了引号asp也认为是数字 --- 函数 int() 功能:数字取整,注意取值是不大于... ASP常用的库函数大全 15页 免费 ASP系列VB函数大全 30页 2下载券...
ASP 系列函数大全 19页 1财富值 ASP 日期函数不完整版大全 4页 1财富值...vbShortTime4 使用 24 小时格式(hh:mm)显示时间。 说明 下面例子利用 ...
4页 1财富值 ASP函数速查大全手册 9页 免费喜欢此文档的还喜欢 sql函数大全 4页 1财富值 图书管理系统数据库设计 13页 免费 用户控件 7页 10财富值 VB+...
ASP 函数大全 ASP 函数大全 1.函数 array() 功能:创建一个数组变量 格式:...例子<% =formatdatetime("08/04/99",vblongdate) %> 结果:Wednesday,August...
asp常用函数asp常用函数隐藏>> ASP 函数大全 1.函数 array() 函数 功能:...例子<% =formatdatetime("08/04/99",vblongdate) 结果:Wednesday,August 04...
ASP 日期函数不完整版大全 4页 1财富值 ASP函数速查大全手册 9页 免费喜欢此文档的还喜欢 ASP函数大全 8页 1财富值 VB函数大全 4页 5财富值 ASP函数手册 ...
VB鼠标的API函数大全 4页 1下载券 WINDOWS_VC_VB_API函数大... 36页 ...API 函数本来是为 C 和 C++程序员写的,是 Windows 系列软件为程序开发 人员...
热门文档