Math
Provides some mathematical functions.
Math(type, value1, value2, format1, format2)
Parameters
- type: Kind of function, functions are:
- Add: adds the two values
- Sub: substracts
- AddTime: adds time in 24h format
- SubTime: substracts
- SubDate: returns the days between the both dates
- value1, value2 : The variable values given to the function.
- format1, format2 : The Time or Dateformat, same like ConvertDate, Time: hhmm, hh, ss
Return Values
Result numeric value.
Remarks
Example
//Declare the function Math to as 2 hours to a time 10:35
var func = "Math(AddTime,1035,02,hhmm,hh)";
var result = ExecFunc(func);
//result = 1235
//Declare the function Math to return the number of days between two dates
func = "Math(SubDate,13OCT2002, 15OCT2002, ddMMMyyyy,ddMMMyyyy)";
result = ExecFunc(func);
//result = 2