ASP函數速查表,建站技術
導讀:建站技術建站技術Array()函數返回一個數組表達式 Array(list)允許數據類型: 字符,數字均可實例:Dim myArray()For I = 1 to 7Redim建站技術教學技術網站。
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) 允許數據類型: 任何有效的字符均可(不大于32767) 實例: 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; numb織夢模板er 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,toDate) & _ " days to millenium from 9/9/00." 返回結果: 從9/9/00 到2000年還有 150 天.
Day() 函數返回一個月的第幾日 . 表達式 Day(date) 允許數據類型: date 是任何有效的日期。 實例: =Day(#9/9/00#) 返回結果: 9
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-08-08 ,文章ASP函數速查表,建站技術主要講述函數,速查表,建站網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_38277.html