Functions list of the VBScript language
Function categories:
VBScript data type functions:
CBool() | Returns an expression that has been converted to the value of the Boolean type |
CByte() | Returns an expression that has been converted to the value of the Byte type |
CDate() | Returns an expression that has been converted to the value of the Date type |
CDbl() | Returns an expression that has been converted to the value of the Double type |
CInt() | Returns an expression that has been converted to the value of the Integer type |
CLng() | Returns an expression that has been converted to the value of the Long type |
CSng() | Returns an expression that has been converted to the value of the Single type |
CStr() | Returns an expression that has been converted to the value of the String type |
IsArray() | Returns a Boolean value - specifies whether the variable is an array |
IsDate() | Returns a Boolean value - specifies whether an expression can be converted to a date |
IsEmpty() | Returns a boolean value - specifies whether a variable has been initialized |
IsNull() | Returns a boolean value that specifies whether an expression contains no valid data |
IsNumeric() | Returns a Boolean value - specifies whether an expression can be evaluated as a number. |
IsObject() | Returns a Boolean value - specifies whether an expression references a valid Automation object |
TypeName() | Returns a string containing data type information about a variable |
VarType() | Returns a value indicating the data type of the variable |
InputBox() | Displays a window for entering the value |
MsgBox() | Displays a message in the window, waits for the user to click a button |
Abs() | Absolute value of a number |
Atn() | Returns the arctangent of a number |
Cos() | Returns the cosine of an angle |
Eval() | Calculate expression and returns value |
Exp() | Returns e (the base of natural logarithms) raised to a power |
Fix() | Returns the integer portion of a number |
FormatNumber() | Returns an expression formatted as a number |
FormatPercent() | Returns an expression formatted as a percentage (multiplied by 100) with a trailing "%" character |
Hex() | Returns a string that represents the value of a number in hexadecimal |
Int() | Returns the integer portion of a number |
Log() | Returns the natural logarithm of a number |
Oct() | Returns a string that represents the octal value of a number |
Rnd() | Returns a random number |
Round() | Returns a number rounded to a specified number of decimal places |
Sgn() | Returns an integer indicating the sign of a number |
Sin() | Returns the sine of an angle |
Sqr() | The square root of a number |
Tan() | Returns the tangent of an angle |
Date() | Returns the current system date |
DateAdd() | Returns a date to which a specified time span has been added |
DateDiff() | Returns the number of time-spans between two dates |
DatePart() | Returns the specified part of a given date |
DateSerial() | Returns a date for a specified year, month, and day |
DateValue() | Returns a date without time |
Day() | Day of the month (integer 1-31) |
FormatDateTime() | Returns an expression formatted as date or time |
Hour() | The hour of the day (integer 0-23) |
Minute() | The minute of the hour (integer 0-59) |
Month() | Month (integer 1-12) |
MonthName() | Returns the month name |
Now() | Returns the current date and time |
Second() | The second of the minute (integer 0-59) |
Time() | Returns the current system time without date |
TimeSerial() | Returns a value of the Date type containing the time for a specific hour, minute, and second |
TimeValue() | Returns a value of the Date type containing the time |
Weekday() | Day of the week |
WeekdayName() | Returns the name of the day in week |
Year() | Year (integer) |
VBScript string functions (See also: Pm string methods):
Asc() | Returns the ANSI character code corresponding to the first letter in the string |
Chr() | Returns the character associated with the specified code |
InStr() | Returns the position of the first occurrence of one string within another |
InstrRev() | Returns the position of an occurrence of one string within another, from the end of the string |
Join() | Returns a string created by joining a number of substrings contained in the array |
LCase() | Returns a string that has been converted to lowercase |
Left() | Returns a specified number of characters (substring) from the left side of the string |
Len() | Returns the number of characters in the string |
LTrim() | Returns a copy of a string without leading spaces (left trim) |
Mid() | Returns a specified number of characters from a string |
Replace() | Returns string in which a specified substring has been replaced with another substring a specified number of times |
Right() | Returns a specified number of characters from the right side of a string |
RTrim() | Returns a copy of a string without trailing spaces at the end (right trim) |
Space() | Returns a string containing the specified number of spaces |
Split() | Returns a 1-dimensional array of substrings |
StrComp() | Returns a value indicating the result of a string comparison |
String() | Returns a repeating character string of the length specified |
StrReverse() | Returns a string in which the character order of a specified string is reversed |
Trim() | Returns a copy of a text string without both leading and trailing spaces |
UCase() | Returns a string that has been converted to uppercase |
VBScript array functions:
Array() | Returns 1-dimensional array of values |
Filter() | Returns a subset of a string array based on a specified filter criteria. |
LBound() | Returns the smallest available index for the indicated dimension of the array |
UBound() | Returns the largest available index for the indicated dimension of the array |
VbScript other functions:
CreateObject() | Creates and returns an Automation object |
GetObject() | Returns the Automation object from the file |
RGB() | Returns a integer that represents an RGB color value |