Dateadd
=======
Add or subtract a period of time from a given date. Period of time includes year, week, day, month, hour, minute, second.
e.g.
newdate = dateadd("m",2,"10-Jan-95")
where m = timeperiod
2 = how many timeperiods
newdate would be + 2 months ie 10-Mar-95
-2 would be 2 months previously
Datediff
========
Calculate differance between two dates. Result can be positive or negative. Good for determining if date is before/after another date.
if datediff("d",date1,date2) > 0 then
date2 is after date1
end if
Instr
=====
Find the presence of a string within another string. E.g. If you want to find a string in a file you can use this function within a loop and check everyline.
linestr = myfile.readline
if instr(linestr, "string we want") then
do something
end if
Split
=====
split a string into an array, by a delimiter. e.g. you can split lines from a CSV file by the ','
e.g. line in a file reads "thisvalue = 10"
linestr=myfile.readline
myarray = split(linestr, "=")
valuewewant = myarray(1)
remember arrays start at zero
Ubound
======
the size of an array. if want to cycle thru an array and you dont know how big it is
then u can do
for i = 0 to ubound(array)
myvalue = array(i)
.....
next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.