VBScript function
Functional description
example
ABS (value) absolute value. The absolute value of a number is its positive value. The absolute value of the empty string (NULL) is also an empty string. The variables that are not initialized are absolutely 0 cases: ABS (-2000)
Results: 2000ARRAY (array elements separated by a community) The Array function returns the value of the array element. example:
A = ARRAY (1,2,3)
b = a (2)
Result: 2
Note: Value of variable B is the second element of an array. ASC (string) converts the first letter of the string to ANSI (National Standard Symbol). Example: Asc ("Internet")
Result: 73
Note: Show the ANSI code of the first letter i. CBOOL (expression) converted into Boer logical value variable type (TRUE or FALSE) Example: CBool (1+2)
Results: True CDATE (Date Express) is replaced with the date variable type. You can use the ISDATE function to determine whether it can be converted into a date. Example: cdate (now () +2)
Results: 2000/5/28 10:30:59 CDBL (expression) converted to Double variable form. Chr (ANSI code) converts ASCII font code into characters. Example: CHR (72)
Results: H CINT is converted into an integer variable form. Example: CINT ("3.12")
Results: 3 ClNG (expression) convert to a long variable form. CSNG (expression) converts to Single variable type. CSTR (expression) is converted into a string variable form. Date () is returned to the date of the system. Example: Date
Results: 2000/5/13Dateadd (i, n, d) plus a date with a period of date. I: Set a unit during a period (DATE). For example, interval = "d" indicates that the unit of n is the day. The setting value of i is as follows:
YYYY Year Year
quarter season
M Month Monthly
day day
wwekday week
hhouse
n minute score
s sex seconds
N: Numerical expression, set a period of one date, can be positive or negative, positively indicate adding (the result> date after date), negative value indicates date).
D: Date to be added and subtracted. Example: Dateadd ("M", 1, "31-JAN-98"))
Result: 28-Feb-98
Note: Add the date of 31-JAN-98 for a month, and the result is 28-Feb-98 instead of 31-Fe-98.
Example: Dateadd ("D", 20, "30-JAN-99"))
Result: 1999/2/9
Note: The date of 30-JAN-99 will be added with a date. Datediff (i, d1, d2 [, fw [, fy]]) calculate the period between the two dates.
I: Set the unit of calculation between the period between two dates. For example,> i = "m" means the unit of calculation is the month. > I set the set value such as:
yyyy> year year
quarter season
M Month Monthly
day day
wwekday week
hhouse
m minute score
s sex seconds
D1, D2: Two date expressions during the calculation period. If> date1 is earlier, the result of the period between the two dates is positive; if the> date2 is earlier, the result is negative.
FW: Set the first day of the week every week, if it is not set, it is expressed on Sunday. > The setting value of FW is as follows:
0 Use the set value of the> API.
1 Sunday
2nd Monday
3 Tuesday
4th Wednesday
5 Thursday
6 Friday
7 Saturday
FY: Set the first week of one year. If it is not set, it means that the first week of the week of January is the first week of the year. > FY's setting value is as follows:
0 Use the set value of the> API.
January 1st is the first week of one year
2 At least the first week of four days is the first week of one year
3 Including the first week of seven days is the first week of one year: DateDiff ("D", "25-MAR-99", "30-JUN-99")
Result: 97
Note: It shows that the period between two dates is 97 days. Datepart (i, d, [, fw [, fw]]) returned to the part of a date.
> i: Set the part of which part. For example,> i = "d" means that the return part is the day. > The setting value of i is as follows:
YYYY Year Year
quarter season
M Month Monthly
day day
wwekday week
hhouse
m minute score
s sex seconds
D: Date to be calculated.
> FW: Set the first day of the week every week, and if it is not set, it means Sunday. > The setting value of FW is as follows:
0 Use the set value of the> API.
1 Sunday
2 Monday> 3 Tuesday
4th Wednesday
5 Thursday
6 Friday
7 Saturday
FY: Set the first week of one year. If it is not set, it means that the first week of the week of January is the first week of the year. > FY's setting value is as follows:
0 Use the set value of the> API.
January 1st is the first week of one year
2 At least the first week of four days is the first week of one year
3 Including the first week of seven days is the first week of one year: datepart ("m", "25-mar-99"))
Result: 3
Note: Show the month that is spread back to a date. DateSerial (Year, Month, Day) conversion (year, month, day) is a date variable form. Example: DateSerial (99,10,1)
Results: 1999/10/1DateValue (Date of Date or Express) converted into a date variable form, and the date from January 1,100 to December 31,9999. The format is Month, Day, And Year, or Month/Day/Year. For example: DECEMBER 30,1999, DEC 30,1999, 12/30/1999, 12/30/99: Datevalue ("January 1,2002")
Results: 2002/1/1DAY (Date String or expression) returned to the "day" part of the date. Example: Day ("12/1/1999")
Results: 1fix (expression) converted string into an integer digital form. Same as INT function. If it is NULL when null.
The difference between int (number) and fix (number) is negative. Such as int (-5.6) = -6, fix (-5.6) = -5. Example: fix (5.6)
Results: 5HEX (expression) returned the value of the value of the value. If the expression is null, hex (expression) = NULL, if the expression = empty, hex (expression) = 0. The 16th place can be added with "& h", for example, the hexadecimal & H10 indicates the decimal 16. Example: Hex (30)
Results: 1ehour (time string or expression) returned the "hour" part of the time. Example: Hour ("12:30:54"))
Results: 12Instr ([Start,] string1, String2 [, Compare]) compares one string from left to the other to the same position from left to the other.
Start starts from the first few words. If Start is omitted from the first word, String1 For the string expression to be looking for, String2 is to compare the string expression, compare is a comparison method, compare = 0 Table binary comparative method, compare = 1 table text comparative method, if comparative compare is a preset binary comparative method. Example: Instr ("ABC123DEF123", "12")
Results: 4INSTRREV ([String,] string1, String2 [, Compare]) compares one string from right to the other to another, and return to the same position in the first one.
Start starts from the first few words. If Start is omitted from the first word, String1 For the string expression to be looking for, String2 is to compare the string expression, compare is a comparison method, compare = 0 Table binary comparative method, compare = 1 table text comparative method, if comparative compare is a preset binary comparative method. Example: Instrrev ("ABC123DEF123", "12")
Results: 10INT (expression) returns an integer part of a value. The same as the Fix function. Example: int (5.6)
Results: 5isarray (variable) test variables are (True) No (FALSE) is an array. Example: Isarray (3)
Result: false
Note: Not a array. Whether the ISDATE (Date or String) can be converted into a date. Date from JA
|||