The following highlights the 9 types of functions in relation to numeric strings (4.12), trigonometric function (), character strings (4.14), regular expression (4.15), date / time (4.16), logical (4.17), row/column information (4.18), Null value (4.19), data type conversion (4.20).
Section |
Function name |
Function |
Output type |
sum( |
Sum |
|
|
avg( |
Average |
|
|
sqsum( |
Sum of squares |
|
|
min( |
Minimum value |
|
|
max( |
Maximum value |
|
|
product( |
Product |
|
|
factorial( |
Factorial |
|
|
gcd( |
Greatest common divisor |
|
|
lcm( |
Least common multiple |
|
|
sqrt( |
Square root |
|
|
abs( |
Absolute value |
|
|
sign( |
Sign |
|
|
int( |
Integer part |
|
|
fract( |
Fraction part |
|
|
round( |
Rounding up |
|
|
floor( |
Rounding down |
|
|
ceil( |
Ceiling |
|
|
power( |
Power |
|
|
exp( |
Exponential function |
|
|
log( |
logarithm |
|
|
ln( |
Natural logarithm |
|
|
log2( |
Binary logarithm |
|
|
log10( |
Common logarithm |
|
|
dist(type, |
Distance |
|
|
distgps(latitude1,longtitude1,latitude2,longtitude2) |
GPS distance |
|
|
heron( |
Heron’s formula |
|
|
rand([random seed]) |
Uniform random number |
|
|
randi(minimum value, maximum value[, random seed]) |
Uniform random number |
|
|
nrand(minimum value, maximum value[, random seed]) |
Normal random number |
|
|
pi() |
Pi |
|
|
e() |
Napier’s constant |
|
|
format() |
Format output |
|
Section |
Function Name |
Function |
Output range |
acos( |
Inverse cosine |
|
|
asin( |
Inverse sine |
|
|
atan( |
Inverse tangent |
|
|
atan2( |
Angle of coordinates ( |
|
|
cos( |
Cosine |
|
|
sin( |
Sine |
|
|
tan( |
Tangent |
|
|
degree( |
Degree |
|
|
radian(angle) |
Enter angle as input, return radian as output |
|
|
cosh( |
Hyperbolic cosine |
|
|
sinh( |
Hyperbolic sine |
|
|
tanh( |
Hyperbolic tangent |
|
Section |
Function name |
Function |
Output format |
cat( |
Merge character string |
|
|
length( |
Length of character string |
|
|
fixlen( |
Fixed length conversion |
|
|
right( |
Extract substring from the end |
|
|
left( |
Extract substring from the beginning |
|
|
mid( |
Extract substring |
|
|
toupper( |
Convert characters from lowercase to uppercase |
|
|
tolower( |
Converts characters from uppercase to lowercase |
|
|
capitalize( |
Capitalize the first character |
|
|
match(search string, |
Search for matched strings |
|
|
hasspace( |
Search for white-space characters |
|
Section |
Function name |
Function |
Output format |
regexm( |
Match whole string |
|
|
regexs( |
Match |
|
|
regexrep( |
Replace matching character string |
||
regexlen( |
Match number of characters |
|
|
regexpos( |
Start position of character |
|
|
regexstr( |
Match character string |
|
|
regexpfx( |
Match prefix of character string |
|
|
regexsfx( |
Match suffix of character string |
|
Section |
Function Name |
Function |
Output |
today() |
Today’s date |
||
now() |
Current time |
||
tseconds( |
Seconds elapsed |
||
leapyear( |
Decide leap year |
||
year( |
Gregorian calendar |
||
month( |
Month |
||
day( |
Day |
||
week( |
Week number |
||
dow( |
Day of week |
||
time( |
Hour minute second |
||
date( |
Year month day |
||
hour( |
Hour |
||
minute( |
Minute |
||
second( |
Second |
||
age( |
Age |
||
diff( |
Period |
||
uxt( |
Convert to UNIX time |
|
|
julian( |
Convert to Julian day |
|
Section |
Function Name |
Function |
Output |
and( |
Conjunction |
||
or( |
Disjunction |
||
not( |
NOT |
||
if( |
Check logical condition |
|
|
if( |
|
||
if( |
|
||
if( |
|
Section Function Name Function Output Format line() Return the processing line number top() Top row bottom() Last row fldsize() Number of fields argsize( Number of arguments
)
Section |
Function Name |
Function |
Output Format |
nulln() |
NULL value |
|
|
nulls() |
|
||
nulld() |
|
||
nullt() |
|
||
nullb() |
|
||
isnull( |
NULL value check |
|
|
isnull( |
|
||
isnull( |
|
||
isnull( |
|
||
isnull( |
|
||
countnull( |
Number of NULL values |
|
|
countnull( |
|
||
countnull( |
|
||
countnull( |
|
||
countnull( |
|
|
|
|
|
|
|
|
n2s( |
n2b( |
|||
|
s2n( |
s2d( |
s2t( |
s2b( |
|
|
d2s( |
d2t( |
|||
|
t2s( |
t2d( |
|||
|
b2n( |
b2s( |
Each cell corresponds to the conversion function from the labels in the top row to labels in the left column.
Empty cells means that conversion function is not available.