The following table outlines the SQL **Numeric function** that can be used in NetSuite search formulas and custom formula fields:

Function |
Syntax |
Description |
Example |
---|---|---|---|

ABS |
ABS(n) |
returns the absolute value of n |
ABS({amount}) |

ACOS |
ACOS(n) |
returns the arc cosine of n |
ACOS(0.35) |

ASIN |
ASIN(n) |
returns the arc sine of n |
ASIN(1) |

ATAN |
ATAN(n) |
returns the arc tangent of n |
ATAN(0.2) |

ATAN2 |
ATAN2(n1 { , | / } n2) |
returns the arc tangent of n1 and n2 |
ATAN2(0.2, 0.3) |

BITAND |
BITAND(expr1, expr2) |
computes an AND operation on the bits of expr1 and expr2 |
BITAND(5, 3) |

CEIL |
CEIL(n) |
returns smallest integer greater than or equal to n |
CEIL({today}-{createddate}) |

COS |
COS(n) |
returns the cosine of n |
COS(0.35) |

COSH |
COSH(n) |
returns the hyperbolic cosine of n |
COSH(-3.15) |

EXP |
EXP(n) |
returns e raised to the nth power, where e = 2.71828183 |
EXP({rate}) |

FLOOR |
FLOOR(n) |
returns largest integer equal to or less than n |
FLOOR({today}-{createddate}) |

LN |
LN(n) |
returns the natural logarithm of n |
LN(20) |

LOG |
LOG(n2, n1) |
returns the logarithm, base n2, of n1 |
LOG(10, 20) |

MOD |
MOD(n2, n1) |
returns the remainder of n2 divided by n1 |
MOD({today}-{lastmessagedate},7) |

NANVL |
NANVL(n2, n1) |
returns an alternative value n1 if the input value n2 is not a number |
NANVL({itemisbn13}, '') |

POWER |
POWER(n2, n1) |
returns n2 raised to the n1 power |
POWER({custcoldaystoship},-.196) |

REMAINDER |
REMAINDER(n2, n1) |
returns the remainder of n2 divided by n1 |
REMAINDER |

ROUND (number) |
ROUND(n [, integer ]) |
returns n rounded to integer places to the right of the decimal point |
ROUND(({today}-{startdate}), 0) |

SIGN |
SIGN(n) |
returns the sign of n |
SIGN({quantity}) |

SIN |
SIN(n) |
returns the sine of n |
SIN(5.2) |

SINH |
SINH(n) |
returns the hyperbolic sine of n |
SINH(3) |

SQRT |
SQRT(n) |
returns the square root of n |
SQRT(POWER({taxamount}, 2)) |

TAN |
TAN(n) |
returns the tangent of n |
TAN(-5.2) |

TANH |
TANH(n) |
returns the hyperbolic tangent of n |
TANH(3) |

TRUNC (number) |
TRUNC(n1 [, n2 ]) |
returns n1 truncated to n2 decimal places |
TRUNC({amount}, 1) |