array ()
The function returns a array
Expression array (List)
Allow data type: character, numbers can be available
Example:
<%
dim myarray ()
for i = 1 to 7
Redim Preserve Myarray (i)
myarray (i) = weekdayname (i)
next
%>
Return result: establishes 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.write cint (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:
<%
set con -= 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.write "the back result is:" & cstr (s)
%>
Return result: Convert the number "5" as the 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:
timeInterval is the time interval to add;
number is amount of time intervals to add;
and date is the starting date.
Example:
<%
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
%>
Return result: 9/9/00
3:34:45 PM
"m" = "month";
"d" = "day";
ifurrentdate is in time format then,
"H" = "Hour";
"s" = "second";
datingiff ()
The function returns the difference between the two dates.
Express Datediff (TimeInterval, Date1, Date2 [, FirstDayOfweek [, Firstweekofyear]]))
Allowing data type: TimeInterval represents the type separated by time, such as "M" means "month".
Example:
<%
Fromdate = #9/9/00 #
todate = #1/1/2000 #
response.write "there are" & _
Datediff ("d", fromDate, TODATE) & _
"Days to millenium from 9/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, SEPTEMBER 09, 2000
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. ; LeadingDigit I 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. ; GroupDigit I 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)%>
|||