ASP function Encyclopedia
1. function Array ()
Function: Create an array variable
Format: Array (list)
Parameters: List of each numeric column in an array variable, separated by a comma
Example:
Result: I was given an array
2. function Cint ()
Function: Converts an expression/other type of variable to an integer type (int)
Format: Cint (expression)
Parameter: expression is any valid expression/other type of variable
Example:
Results: 236
function CInt () converts the character "234" to an integer 234. If the expression is empty or invalid, the return value is 0;
3. Function: Creatobject ()
Function: Creates and returns an ActiveX object.
Format: Creatobject (obname)
Parameters: Obname is the name of the object
Example:
Results:
4. function Cstr ()
Function: Converts an expression/other type of variable to a character type (string)
Format: Cstr (expression)
Parameter: expression is any valid expression/other type of variable
Example:
Result: the function CStr () converts the integer 5 to the character "5".
5. function Date ()
Function: Returns the date of the current system (server side)
Format: Date ()
Parameters: None
Example:
Result: 05/10/00
6. Function Dateadd ()
Function: Calculates 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 point of origin.
Example:
Results:
11/4/99
3:34:45 PM
which
"M" = "month";
"D" = "Day";
If the format is currentdate, the
"H" = "Hour";
"S" = "second";
7. function Datediff ()
Function: Calculates a specified time difference for a quantity
Format: DateDiff (Timeinterval,date1,date2[,firstdayofweek[,firstdayofyear]])
Parameters: TimeInterval is a time unit; Date1,date2 is a valid date expression, Firstdayofweek,firstdayofyear is any option.
Example:
Results: There are to millenium from 8/4/99.
8. Function Day ()
Function: Returns an integer value that corresponds to a day of the month
Format: Day (date)
Parameter: date is a valid datetime expression;
Example:
Results: 4
9. Function FormatCurrency ()
Functions: Converting to currency format
Format: formatcurrency (expression [, digit[,leadingdigit[,paren[,groupdigit]]]
Parameter: expression is a valid numeric expression; digit represents the number of digits after the decimal point; Leadingdigit,paren,groupdigit is any option.
Example:
Result: $34.35
10. function FormatDateTime ()
Features: Formatting date expressions/variables
Format: FormatDateTime (Date[,nameformat])
Parameter: Date is a valid day expression/variable; NameFormat is the specified date format constant name.
Example:
Results: Wednesday,august 04,1999
11. Function FormatNumber ()
Features: Formatting numeric expressions/variables
Format: Formatnumbe (expression [, digit[,leadingdigit[,paren[,groupdigit]]]
Parameters: Express is a valid numeric expression, digit represents the number of digits after the decimal point; Leadingdigit,paren,groupdigit is any option
Example:
Results: 23.222
12. function FormatPercent ()
Function: Format percent expression/variable
Format: formatnumber (expression [, digit [, leading [, Paren[,groupdigit]]]
Parameter: expression is a valid numeric expression, digit represents the number of digits after the decimal point; Leadingdigit,paren,groupdigit is any option
Example:
Results: 45.233
13. Function: Hour ()
Function: Returns a numeric value corresponding to the specified time.
Format: Hour (time)
Parameter: Time corresponds to the specified period.
Example:
Results: 16 (24-hour system)
14. Function InStr ()
Function: Returns a numeric value that corresponds to the position of a character (string) in another string.
Format: InStr ([Start,]strtobesearched,strsearchfor [, compare])
Parameters: Start (optional) is searched from the start bit, strtobesearched is the search string, strSearchFor is looking for the target. Compare is any option
Example:
Result: 9, (the character "A" is at the nineth bit of the strtext string)
15. Function InStrRev ()
Function: Returns a numeric value that corresponds to the position of a character (string) in another string (looking from the back).
Format: InStrRev ([Start,] strtobesearched,strsearchfor[,compare])
Parameters: Reference InStr (),
Example:
Result: 13, the string "s" is the 13th character of the strtext (from the back start to look for)
16. function int ()
Function: Digital rounding
Format: Int (number)
Parameter: number is any valid numeric expression/other type of variable
Example:
Result: 322 (if using CInt () The result is 323)
17. Function IsArray ()
Function: Returns a Boolean value that determines whether the variable is an array.
Format: IsArray (name)
Parameters: Name is variable names
Example:
Result: false
18. Function IsDate ()
Function: Returns a Boolean value that determines whether a variable is a date variable.
Format: isdate (expression)
Parameter: expression is any variable.
Example:
Result: True
19. Function IsEmpty ()
Function: Returns a Boolean value that determines whether the variable is empty.
Format: isempty (expression)