ASP type conversion function encyclopedia 1th/2 Page _ Application Tips

Source: Internet
Author: User
Tags square root time interval
ABS (number)
Returns the absolute value.
Array (arglist)
Creates an array.
ASC (String)
Returns the ANSI code for the first character of a string.
ATN (number)
Returns the inverse chord value.
CBool (expression)
Converts to a Boolean data type variable.
CByte (expression)
Convert to byte data type variable.
CCur (expression)
Convert to Currency data type variable.
CDate (expression)
Convert to date data type variable.
CDbl (expression)
Converts to a double data type variable.
Chr (charcode)
Converts the ANSI code to the corresponding keyboard character.
CInt (expression)
Converts to an integer data type variable.
CLng (expression)
Converts to a Long data type variable.
CreateObject (Servername.typename)
Creates an automatic object.
CSng (expression)
Convert to single data type variable.
CStr (expression)
Converts to a string data type variable.
Date
Returns the time according to the system used.
DATEADD (Interval,number,date)
Adds a specified time interval to the Date object. Where the parameter interval accepts the values shown in the following table.
Set Value
Describe
yyyy
Years
Q
Quarter
M
Month
Y
The first day of the year
D
Days
W
Day of the Week
Ww
The first few weeks of the year
H
Hours
M
Minutes
Seconds
 
DateDiff (Interval,date1,date2])
Returns the interval between two dates, the values for FirstDayOfWeek and FirstWeekOfYear refer to the "Date and time Constants" section below. The interval parameter accepts the values shown in the following table.
Set Value
Describe
yyyy
Years
Q
Quarter
M
Month
Y
The first day of the year
D
Days
W
Day of the Week
Ww
The first few weeks of the year
H
Hours
M
Minutes
Seconds
 
DatePart (interval, date])
Returns the specified portion of the Date object. For FirstDayOfWeek and FirstWeekOfYear values, refer to the "Date and time Constants" section below. The interval parameter accepts the values shown in the following table.
Set Value
Describe
yyyy
Years
Q
Quarter
M
Month
Y
The first day of the year
D
Days
W
Day of the Week
Ww
The first few weeks of the year
H
Hours
M
Minutes
Seconds
 
DateSerial (Year,month,day)
Converts to a date data subtype variant value.
DateValue (date)
Converts to a date data subtype variant value.
Day (date)
Returns the numbered of the day in one months, based on the parameter date.
EXP (number)
Returns the value of the number-second side of E.
Filter (Inputstrings,value])
Creates a new array based on the filter criteria. For a compare value, see the "Comparison Constants" section later.
Fix (number)
Converts to an integer (in the case of negative numbers, only in the shed).
FormatCurrency (expression]])
Format into currency form. For includeleadingdigit,useparensfornegativenumbers and Groupdigit values, refer to the "three-state Constants" section later.
FormatDateTime (date)
Format the output for the date and time. For NamedFormat values, see the "Date Format constants" section later.
FormatNumber (expression]])
Formats the numbers. For includeleadingdigit,useparensfornegativenumbers and Groupdigit values, refer to the "three-state Constants" section later.
FormatPercent (expression]])
The percentages are formatted. For includeleadingdigit,useparensfornegativenumbers and Groupdigit values, refer to the "three-state Constants" section later.
GetObject ()
Returns the specified dynamic object from the specified file.
Hex (number)
Returns the hexadecimal value of the number.
Hour (time)
Returns an hour based on the value of the parameter time.
InputBox (Prompt)
Displays a temporary input box and returns the user's input.
InStr (String1,string2)
Returns the position of the first occurrence of the string string2 in the string string1. Refer to the "Comparison constants" section later on for compare values.
InStrRev (String1,string2])
Returns the position of the last occurrence of the string string2 in the string string1. Refer to the "Comparison constants" section later on for compare values.
Int (number)
Returns an integer (the negative number is not placed).
IsArray (varname)
Determines whether a variable is an array.
IsDate (expression)
Determines whether an expression expression can be converted to a date format.
IsEmpty (varname)
Determines whether the variable has been initialized.
IsNull (expression)
Determines whether an expression expression is empty.
Isnumberic (expression)
Determines whether the result of an expression expression is a number.
IsObject (expression)
Determines whether an expression expression is an automatic object.
Join (list,)
Concatenate all substrings in an array, and the delimiters used by the connection are set by the value of the Delimiterd.
LBound (Arrayname)
Returns the minimum bounds for a dimension of an array. In the current version of VBScript, the function always returns a value of 0.
LCase (String)
formatted as lowercase characters.
Left (String,length)
Returns the left portion of a string that has a specified length.
Len (string|varname)
Returns the length of string strings or the byte length of a variable varname.
LoadPicture (Pitcurename)
Loads a picture object.
Log (number)
Returns the natural pair value of number.
LTrim (String)
Deletes the extra space on the left side of the strings string.
Mid (Strin,start)
Returns a substring of string strings of the specified length.
Minute (time)
Returns the value of a minute based on the value of the parameter time.
Month (date)
Returns the month represented by a number.
MonthName (month)
Returns the month represented by name.
MsgBox (Prompt)
Displays a message box that asks the user to select a button that returns a value indicating the user's choice. See the "Message Box Constants" section later on for button values and return values.
Now
Returns the current date and time, depending on the system.
Oct (number)
Returns the octal value of number.
Replace (Expression,find,replacewith]])
Replaces the specified substring, replacewith, with the specified substring, to find the specified number of times. For the value of parameter compare, see the "Comparison Constants" section later.
Right (String,length)
Returns a substring of the right part of a string that has a specified length.
Rnd ()
Produces a random number.
Round (number)
Rounds the logarithm number by the specified decimal digits.
RTrim (String)
Remove the extra space on the right side of the strings string.
ScriptEngine
Returns the name of the scripting language used.
ScriptEngineBuildVersion
Returns the version of the script engine used.
Scriptenginemaorversion
Returns the large version number of the script engine used.
Second (time)
Returns the second ordinal of the minute based on the value of the parameter time.
SGN (number)
Returns the plus and minus numbers of number.
Sin (number)
Returns the sine value of number.
Space (number)
Creates a string with a specified number of spaces.
Split (expression]])
Splits a string and converts the array. For compare values, see the "Comparison Constants" section later.
SQR (number)
Returns the square root value of number.
StrComp (STRING1,STRING2)
String comparisons. For compare values, see the "Comparison Constants" section later.
StrReverse (string1)
Reverse the string string1.
String (Number,character)
Creates a string with number characters character.
Tan (number)
Returns the tangent of a number.
Time
Returns the current time according to the system.
TimeSerial (Hour,minute,second)
Returns the date variable body.
TimeValue (Time)
Returns the date variable body that contains the time.
Trim (String)
Deletes the extra space on either side of the strings string.
TypeName (varname)
Returns the name of the child type. See the "Variable Type Constants" section later on for return values.
UBound (Arrayname)
Returns the upper bounds of a dimension of an array. The default dimension is the first dimension.
UCase (String)
Format string strings in uppercase letters.
VarType (varname)
Returns the value of a subtype. See the "Variable Type Constants" section later on for return values.
Weekday (date,)
Returns the day of the week in digital form. Refer to the "Variable Type Constants" section later on for the value of the parameter firstdayofweek.
WeekdayName (Weekday,abbreviate,firstdayofweek)
Returns the day of the week in the form of a name. Refer to the "Variable Type Constants" section later on for the value of the parameter firstdayofweek.
Year (date)
Returns the year based on the parameter date.
Awaiting publication at 2008-2-25 17:04
Some examples and explanations
IsNumeric ()
 
function to determine whether an object is a number, | A Boolean value.
 
Expression isnumeric (expression)
 
Example: <%
 
I = "345"
 
Response.Write IsNumeric (I)
 
%>
 
| Result: True
 
Even if the number is quoted, the ASP thinks it is a number.

Current 1/2 page 12 Next read the full text
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.