The ASP function is reproduced here for everyone to check.
How to use: Use [Edit]-[Find] in the IE menu to check the functions you are looking for.
Array ()
The function returns a array
Expression array (List)
Allow data type: character, numbers can be available
Example:
<%
Dimmyarray ()
Fori = 1TO7
RedimpReservemyarray (i)
myarray (i) = weekdayname (i)
Next
%>
Return result: Create a array of 7 elements MyARRAY:
MyARAY (Sunday, Monday, ...... Saturday)
Cint ())
The function converts an expression into a digital type
Expression CINT (Expression)
Allow data type: Any effective characters can be
Example:
<%
f = 234
response.writecint (f) +2
%>
Return result: 236
The conversion character 234 is the number 234, if the string is empty, the 0 value is returned
CreateObject ()
Function creates and returns an instance of registered ActiveX components.
Expression CreateObject (Objname)
Allowing data type: Objname is the name of any effective, registered ActiveX component.
Example:
<%
Setcon = Server.createObject (Adodb.connection)
%>
Cstr ())
The function transforms an expression as a string.
Expression CSTR (Expression)
Allowing data type: Expression is an effective expression.
Example:
<%
s = 3+2
response.writthe return result is: & cstr (s)
%>
Return result: Convert numbers 5 to character 5.
Date (date)
The function returns the current system date.
Expression date ()
Allow data type: None.
Example:
<%= Date%>
Return result: 9/9/00
Dateadd ()
The function returns a changeable date.
Expressing DateAdd (TimeInterval, Number, Date)
Allow data type:
time interval is the timeInterval to add;
number is amount of timeIntervals to add;
Anddate is the starting date.
Example:
<%
Currentdate =#9/9/00#
newDate = Dateadd (m, 3, CurrentDate)
response.writeNewDate
%>
<%
Currentdate =#12: 34: 45 PM#
newDate = Dateadd (H, 3, CurrentDate)
response.writeNewDate
%>
Back results:
9/9/00
3:34:45 PM
m = Month;
d = day;
IFCurrentDateisintimeFormatthen,
h = host;
s = second;
Datingiff ()
The function returns the difference between the two dates.
Express Datediff (TimeInterval, Date1, Date2 [, FirstDayOfweek [, Firstweekofyear]]))
Allowing data types: TimeInterval represents the type separated by time, such as M represents the month.
Example:
<%
Fromdate =#9/9/00#
todate =#1/1/2000#
response.writethereare & _
Datediff (d, fromDate, TODATE) & _
Daystomilleniumfrom9/9/00.
%>
Return results: There are 150 days from 9/9/00 to 2000.
Day ())
The function returns to the day of a month.
Expression day (date)
Allowing data type: Date is any effective date.
Example:
<%= Day (#9/9/00#)%>
Return result: 4
Formatcurrency ()
The function returns the expression, and this expression has been formatted to the currency value
表达式FormatCurrency(Expression[,Digit[,LeadingDigit[,Paren[,GroupDigit]]]])
Allow data type: DIGIT indicates the value of the number of display bits on the right side of the decimal point. The default value is -1, indicating that the computer's area settings are used; leadingdigit triimal constant, indicating whether the zero of the small value of the decimal point point is displayed.
Example:
<%= Formatcurrency (34.3456)%>
Return result: $ 34.35
FormatDateTime ()
The function returns the expression, and this expression has been formatted to date or time
Expression formatdateTime (date, [, namedFormat]))
Allow data type: namedformat indicates the value of the date/time format used by the use. If it is omitted, use VBGERALDATE.
Example:
<%= FormatDateTime (09/9/00, VBLONGDATE)%>
Back results: Sunday, SEPTEMBER09,20000
Formatnumber ()
The function returns the expression, and this expression has been formatted to value.
Expression formatnumber
Allow data type: DIGIT indicates the value of the number of display bits on the right side of the decimal point. The default value is -1, indicating that the computer is set. ; LeadingDigiti indicates the value of the number of digits on the right side of the decimal point. The default value is -1, indicating that the computer is set. ; Paren indicates the value of the number on the right side of the decimal point. The default value is -1, indicating that the computer is set. ; Groupdigiti indicates the value of the number of digits on the right side of the decimal point. The default value is -1, indicating that the computer is set. Then, then
Example:
<%= Formatnumber (45.324567, 3)%>
Back results: 45.325
Formatpercent ()
The function returns the expression, and this expression has been formatted to the percentage of a percentage of%(by 100). (%)
表达式FormatPercent(Expression[,Digit[,LeadingDigit[,Paren[,GroupDigit]]]])
Allow data type: Ibid.
Example: <%= FORMATPERCENT (0.45267, 3)%>
Return result: 45.267%
Hour ()
The function returned to the hour at 24 o'clock.
Expression Hour (Time)
Allow data type:
Example:
<%= House (#4: 45: 34pm#)%>
Return result: 16
(HourSBeenConvertedto24-HourSystem)
Instr)
The function returns the character or string that appears for the first time in another string.
Expression Instr ([Start,] StrTobesearched, StrsearchFor [, Compare]))
Allowing data types: Start is the starting value of search, StrtObEsearched accepts the search string StrsearchFor to search .Compare comparison method (see ASP constant in detail)
Example:
<%
strtext = thisISISTEST !!
POS = Instr (StrText, A)
response.write pos
%>
Return result: 9
Instrrev ()
The function is the same as above, just starting with the last search of the string
Expressing Instrrev
Allow data type: Ibid.
Example:
<%
strtext = thisISISTEST !!
POS = Instrrev (StrText, S)
response.write pos
%>
Return result: 13
Int (int (int (int (
The function returns numerical types, and does not settle in.
Expression int (number)
Allow data type:
Example:
<%= Int (32.89)%>
Back results: 32
Isarray ()
Function determines whether an object is an array and return to the Boolean value.
Expressive Isarray (name)
Example:
<%
StrTest = Test!
response.write Isarray (Strtest)
%>
Back results: false
Isdate ()
Function determines whether an object is the date, and return to the Boolean value
Expression isdate (Expression)
Example:
<%
StrTest = 9/4/2000
response.writei sdate (StrTest)
%>
Return result: true
Isempty ()
The function determines whether the object is initialized and returns to the Boolean value.
Expressive Isempty (Expression)
Example:
<%
Dimi
response.write isempty (i)
%>
Return result: true
Isnull ()
The function determines whether the object is empty, and return to the Boolean value.
Expressive Isnull (Expression)
Example:
<%
Dimi
response.write isnull (i)
%>
Back results: false