Everyone has posted the functions and detailed instructions used in ASP for everyone to learn.
What I know is as follows:
1. Function array()
Function: Create an array variable
Format: array(list)
Parameter: list is each numeric column in the array variable, with comma intervals in the middle
example:
<% i = array ("1","2","3") %>
Result: i is assigned as an array
2. Function Cint()
Function: Convert an expression/other type of variable into an integer type (int)
Format: Cint(expression)
Parameter:expression is any valid expression/other type variable
example:
<%
f = "234"
response.write cINT(f) + 2
%>
Results: 236
The function Cint() converts the character "234" into an integer 234. If the expression is empty or invalid, the return value is 0;
3. Function: Creatobject()
Function: Create and return an ActiveX object.
Format: Creatobject(obname)
The parameter bname is the name of the object
example:
<%
Set con = Server.CreateObject("ADODB.Connection")
%>
result:
4. Function Cstr()
Function: Convert an expression/other type of variable into a character type (string)
Format: Cstr(expression)
Parameters: expression is any valid expression/other type variable
example:
<%
s = 3 + 2
response.write "The result is:" & cStr(s)
%>
Result: The function Cstr() converts the integer 5 into the character "5".
5. Function Date()
Function: Return the date of the current system (server side)
Format: Date()
Parameters: None
Example <% date () %>
Results: 05/10/00
6. Function Dateadd()
Function: Calculate a specified time and
Format: dateadd(timeinterval,number,date)
Parameters: timeinterval is the time unit (month, day...); number is the time interval value, and date is the time starting point.
example:
<%
currentDate = #8/4/99#
newDate = DateAdd("m",3,currentDate)
response.write newDate
%> <%
currentDate = #12:34:45 PM#
newDate = DateAdd("h",3,currentDate)
response.write newDate
%>
result:
11/4/99
3:34:45 PM
in
"m" = "month";
"d" = "day";
If it is the currentDate format, then,
"h" = "hour";
"s" = "second";
7. Function Datediff()
Function: Calculate a specified time difference of a certain quantity
Format: datediff(timeinterval,date1,date2[,firstdayofweek[,firstdayofyear]])
Parameters: timeinterval is the time unit; date1 and date2 are valid date expressions, firstdayofweek, firstdayofyear are any options.
example:
<%
fromDate = #8/4/99#
toDate = #1/1/2000#
response.write "There are " & _
DateDiff("d",fromDate,toDate) & _
" days to millionium from 8/4/99."
%>
Results: There are 150 days to millionium from 8/4/99.
8. Function day()
Function: Return an integer value corresponding to a day of a certain month