1. Function array () function: Create an array variable format: array (list) Parameters: List is a numerical column in array variables, an intermediate comma interval example: <% i = array ("1", "2" , "3")%> Result: I is given to array 2. Function CINT () function: Convert an expression / other type of variable into an integer type (int) format: cint (expression) Parameters: Expression is any effective Expression / Other types of variable examples: <% f = "234" Response.write CINT (f) 2%> Result: 236 Function CINT () Convert Character "234" into an integer 234. If the expression is empty When it is invalid, the return value is 0; 3. Function: CreatObject () function: Create and return an ActiveX object. Format: CreatObject (OBNAME) parameter BNAME is an object's name example: <% set con = Server.createObject (" AdoDb.connection ")%> Results: 4. Function CSTR () function: Convert a expression / other type of variable into a string format: cstr (expression) parameter: expression is any valid expression / other Type Variable Example: <% S = 3 2 Response.write "The Res:" & CSTR (S)%> Result: Function CSTR () converts integer 5 into characters "5". 5. Function Date () Function: Returns the date format of the current system (SERVER): Date () parameter: no example <% DATE ()%> Result: 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, Date is the time point. Example: <% currentdate = # 8/4/99 # newdate = dateadd ("m", 3, currentdate) response.write newdate%> <% currentdate = # 12: 34: 45 PM # newdate = dateadd ("h", 3, currentdate) respons E.WRITE NewDate%> Results: 11/4/99 3:34:45 PM where "M" = "MONTH"; "D" = "day"; if it is a currentdate format, "H" = "hour" "S" = "second"; 7. Function datediff () function: calculate a specified time difference format: Datediff (TimeInterval, Date1, Date2 [, Firstday First Date1, Date2 [, Firstdayofweear]) Parameters: TimeInterval is the time unit; Date1 Date2 is a valid date expression, firstdayofweek, firstdayofweear is any option. Example: <% fromdate = # 8/4/99 # Todate = # 1/1/2000 # response.write "There" & _ datediff (" D ", fromDate, Todate) & _" Days to Millenium from 8/4/99. "%>
RESULTS: There Are 150 Days to Millenium from 8/4/99. 8. Function Day () Features: Returns an integer value, corresponding to a certain day format of the month: DAY (date) Parameters: Date is a valid date expression ; Example <% = Date (# 8/4/99 #)%> Results: 4 9. Function FormatCurrency () Function: Convert to Currency Format Format: Formatcurrency (Expression [, Digit [, LeadingDigit [, PAREN [, GroupDigit ]]]]) Parameters: Expression is a valid digital expression; DIGIT represents the number of digits after the decimal point; LeadingDigit, Paren, GroupDigit is any option. Example <% = formatcurrency (34.3456)%> Result 34.35 10. FunctionDateTime () Function: Formatting Date Expression / Variable Format: FormatorTime (Date [, NameFormat]) Parameters: Date is a valid date expression / variable; NameFormat is the specified date format constant name. Example <% = formtdatetime ("08/04 / 99 ", vblongdate)%> Results: Wednesday, August 04, 1999 Description: -------------------------------- ------------------------------------------------ Description Back Expression, this expression has been formatted as a date or time. Syntax formatdatetime (date [, namedformat]) formatdatetime function is the following parameters:
Parameter Description Date must option. The date expression to be formatted. NamedFormat options. Indicates the value of the date / time format used, if omitted, use VBGeneLDate.
Setting the nameDFormat parameter may have the following values: constant value description VbGeneLDate 0 Displays the date and / or time. If there is a date part, the part is displayed as a short date format. If there is a time part, the part is displayed as a long-time format. If all exist, all parts are displayed. VBlongDate 1 displays the date using the long-term format specified in your computer zone setting. VBShortDate 2 Displays the date using the short date format specified in the computer area settings. VBlongTime 3 Displays time using the time format specified in the computer area setting. VBShortTime 4 shows time using 24-hour format (HH: mm).
Description The following example uses the formatdatetime function to format the expression into a long-term type and assign it to myDatetime: Function getCurrentDate "formatdateTime to format the date type as long-term .GetCurrentDate = formatDatetime (date, 1) end function ---- -------------------------------------------------- -------------------------- [Ctrl A All Select Tips: You can modify some code first, then press Run]
11. Function ISNUMERIC () Function: Returns a Boolean value, determine if the variable is a digital variable, or can convert other variables of the number. Format: isNuMeric (Expression) Parameters: Expression is any variable. Example: <% i = "234" Response.Write ISNUMERIC (i)%> Result: True. 12. Function isobject () Features: Returns a Boolean value, determine if the variable is the variable of the object, format: isobject (expression) parameter: Expression is arbitrary variable Example: <% set con = Server.creatobject ("adodb.connection") response.write isobject (con)%> RESUL 13. Function: lbound () Features: Return to a population of an array. Format: lbound (ArrayName [, DIMENSION]) Parameters: ArrayName is an array variable, Dimension is any example: <% i = array ("1", "2", "3") Response.Write Lbound (i)%> Result: 014. function LCASE () function: Transform the characters of a character type variable transform lowercase characters. Format: LCase (String) Parameters: string is a string variable example: <% str = "this is lcase!" Response.write Lcase (STR)% > Result: This is lcase! 15. Function Left () function: Intercepting the front portion of a string; format: Left (string, length) parameter: String string, length intercepting the length. Example: <% = left (" This is a test! ", 6)%> Result: This i 16. Function LEN () function: Return the byte length format of the string length or variable: LEN (String * varName) parameter: string string; varname arbitrary Variable Name Example: <% strTest = "this is a test!" Response.write len (strTest)%> Result: 15 17. Function Ltrim () function: Default to the space before the string. Format: Ltrim (String) Parameters: String string. Example: <% = Ltrim (" THIS IS A TEST! ") Result: This is a test! 18. Function MID () function: Intercept strings from strings. Format: MID (String, start [, length]) Parameters: String string, Start intercept The starting point, Length to intercept the length. Example: <% strTest = "this is a test, Today is Monday!" Response.write MID (StRTEST, 17, 5)%> Result: Today 19. Function Minute () function: Returns a value, indicating minutes format: minute (time) parameter: Time is the time variable example lt;% = minute (# 12: 23: 34 #)%> Result: 23 20. Function Month () function: Return a value, Indicates Month Format: Month (TIME) Parameters: TIME is a date variable example <% = month (# 08/09/99)%> Result: 9 21. Function MONTHNAME () Features: Return to the romance string (name). Format : MONTHNAME (Date [, ABB]) Parameters: Date is a date variable, abbrawal of the month when ABB = True, example: <% = monthname (# 4/5/99 #)%>
RESULTS: April 22. Function Now () Function: Returns the current time and date of the system. Format: now () parameter: no example: <% = now ()%> Results: 05/10/00 8:45:32 PM 23. Function: Replace () Function: Find in a string, replace the specified string. Format: Replace (StrtobesEarched, StRSearchfor, Strreplacewith]]) Parameters: Strtobesearched is a string; STRSEARCHFOR is a substring that StrReplaceWith is used to replace the sub-string .Start, count, compare is any option. Example: <% strTest = "this is an apple." Response.write Replace (StRTEST, "Apple "," orange ")%> Results: this is an orange. 24. Function Right () function: Rear partial format of a string: Right (string, length) parameter: String string, length intercepting length. example : <% StrTest = "this is a test!" Response.write Right (strTTTRTEST, 3)%> ST! 25. Function RND () Function: Return a random numerical format: RND [(Number) Parameters: Number It is any value. Example: <% randomize () response.write rnd ()%> Result: 0/1 value, no randomize (), no random number. 26. Function Round () function: full numeric format : Round (Expression [, Numright]) Parameters: Expression Digital Expression; Numright Any Options. Example: <% i = 12.33654 Response.write Round (i)%> Result: 12 27. Function RTRIM () Features: Remove the string The latter space. Format: RTRIM (String) Parameters: string is a string example: <% response.write RTRIM ("this is a test!")%> Result: this is a test! 28. Function Second () function: Returns an integer value. Format: Second (Time) Parameters: Time is a valid time expression; example lt;% = second (# 12: 28: 30 #)%> Result: 30 29. Function strreverse () function: Return to the original string Arranged string. Format: strreverse (string) Parameters: string is a string example <% = Strreverse ("this is a test!") Result:! Tset A Si SiHT 30. Function Time () Features: Return to the current system Time value. Format: Time () Parameters: No result: 9: 58: 28 AM 31. Function Trim () function: Before deleting the string, the subsequent space. Format: Trim (String) Parameters: String string. Example: <% strast = "this is a test!" Response.write Trtem (STRTEST)%> Result: This is a test! 32. Function Ubound () function: Return to an array of upper bounds. Format: Ubound (Expression [ , Dimension]) Parameters: Expression is an array expression / array variable, and Dimension is any example: <% i = array ("1", "2", "3") Response.Write Ubound (i)%>