---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Formulas for column values in Table Builder

# Formulas for column values in Table Builder {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 12 minutes to read

You can use a predefined function and create a formula to calculate the value of a column without writing a script. Use a predefined function or create a nested formula by using the existing predefined functions to calculate
the column value type.

## Supported operators {#formulas-columns-table-builder__section_nq4_fld_g5b}

The following comparison operators are supported only for number type values.

* = (Equal to)
* \<\> (Not equal to)
* \> (Greater than)
* \< (Less than)
* \>= (Greater than or equal to)
* \<= (Less than or equal to)
{#formulas-columns-table-builder__ul_wg3_3ld_g5b}

## Simple math functions {#ariaid-title2}

Use simple math functions to perform basic mathematical calculations on numeric value
columns.

### AVERAGE {#simple-math-functions-table-builder__section_xmc_yfn_ytb}

Returns the average value of the
arguments.
{#simple-math-functions-table-builder__table_ckw_zfn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| AVERAGE(argument 1, argument 2, ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_ckw_zfn_ytb}Examples:

* Function: AVERAGE(1,2,3)The result is 2.

* Formula: AVERAGE(LENGTH(first_name), LENGTH(last_name))The result is the average
  value of the number of characters in the first_name column and last_name
  column.

{#simple-math-functions-table-builder__ul_y21_3tt_ytb}

### DIVIDE {#simple-math-functions-table-builder__section_skl_l24_ytb}

Returns the final quotient value after
consecutively dividing the first argument with the next argument until the function reaches
the last argument.
{#simple-math-functions-table-builder__table_fdf_n24_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| DIVIDE(argument 1, argument 2 ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_fdf_n24_ytb}Examples:

* Function: DIVIDE(10,20, 0.25, 10)The result is 0.2.

* Formula: DIVIDE(LENGTH(full_name),2)The result is the number of characters in the
  full_name column divided by 2.

{#simple-math-functions-table-builder__ul_apt_qd5_ytb}

### INDEXMATCH {#simple-math-functions-table-builder__section_y2x_mfn_dwb}

Retrieves the first not null value from the specified set of arguments.{#simple-math-functions-table-builder__table_lb3_qfn_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| INDEXMATCH(argument 1, argument 2 , ... argument n) | String, numeric value, function call, or variable. | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_lb3_qfn_dwb}Example:

Function: INDEXMATCH(""," ",2,"string")

The result is 2.

### MAX {#simple-math-functions-table-builder__section_c5k_23n_ytb}

Returns the highest value in the
specified arguments.
{#simple-math-functions-table-builder__table_amb_g3n_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| MAX(argument 1, argument 2, ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_amb_g3n_ytb}Examples:

* Function: MAX(1, -5, 20, 6)The result is 20.

* Formula: MAX(LENGTH(first_name), LENGTH(last_name))The result is the number of
  characters in the first_name column or last_name column whichever is the
  highest.

{#simple-math-functions-table-builder__ul_lqm_svt_ytb}

### MIN {#simple-math-functions-table-builder__section_xv1_h24_ytb}

Returns the lowest value in the specified
arguments.
{#simple-math-functions-table-builder__table_kt3_324_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| MIN(argument 1, argument 2, ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_kt3_324_ytb}Examples:

* Function: MIN(1, -5, 20, 6)The result is -5.

* Formula: MIN(LENGTH(first_name), LENGTH(last_name))The result is the number of
  characters in the first_name column or last_name column whichever is the
  lowest.

{#simple-math-functions-table-builder__ul_qws_nd5_ytb}

### MULTIPLY {#simple-math-functions-table-builder__section_nyn_qcn_ytb}

Returns the total multiplied value
of the arguments.
{#simple-math-functions-table-builder__table_t4r_gdn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| MULTIPLY (argument 1, argument 2, ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_t4r_gdn_ytb} Examples:

* Function: MULTIPLY(12, 4) The result is 48.

* Formula: MULTIPLY(order, 2)The result is the order column value multiplied by
  2.

{#simple-math-functions-table-builder__ul_gsd_pf4_ytb}

### POWER {#simple-math-functions-table-builder__section_hcg_3kn_ytb}

Returns the result of the base value
raised to the power of the exponent value.
{#simple-math-functions-table-builder__table_e35_mkn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| POWER(argument 1, argument 2) | argument 1 is base and argument 2 is exponent. * base: number or variable * exponent: number or variable {#simple-math-functions-table-builder__ul_elh_rkn_ytb} | Number |
[ ]

{#simple-math-functions-table-builder__table_e35_mkn_ytb}Examples:

* Function: POWER(3,2)The result is 9.

* Formula: POWER(LENGTH(full_name),2)The result is the number of characters in the
  full_name column to the power of 2.

{#simple-math-functions-table-builder__ul_ogq_tc5_ytb}

### SUBTRACT {#simple-math-functions-table-builder__section_qs3_njn_ytb}

Returns the result value after
consecutively subtracting the next available argument from the earlier argument until the
function reaches last argument.
{#simple-math-functions-table-builder__table_elz_4jn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| SUBTRACT(argument 1, argument 2 ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_elz_4jn_ytb}Examples:

* Function: SUBTRACT(1.15, 0.02, 0.45, -0.85) The result is 1.53.

* Formula: SUBTRACT(LENGTH(full_name), LENGTH(first_name))The result is the number of
  characters from the full_name column minus the number of characters from the first_name
  column.

{#simple-math-functions-table-builder__ul_s3j_dc5_ytb}

### SUM {#simple-math-functions-table-builder__section_u3v_p24_ytb}

Returns the sum of all the
arguments.
{#simple-math-functions-table-builder__table_qtw_q24_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| SUM(argument 1,argument 2, ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_qtw_q24_ytb}Examples:

* Function: SUM(0.03, -0.02, 1)The result is 1.01.

* Formula: SUM(LENGTH(first_name), LENGTH(last_name))The result is the total number of
  characters in the first_name column plus the total number of characters in the last_name
  column.

{#simple-math-functions-table-builder__ul_yl3_xd5_ytb}

### COUNTIF {#simple-math-functions-table-builder__section_vdh_xd4_dwb}

Returns the number of arguments that match the specified criteria within the specified set of arguments.{#simple-math-functions-table-builder__table_p1x_yd4_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| COUNTIF(argument 1, argument 2, argument n-1, criteria) | * argument 1 ... argument n: String, numeric value, function call, or variable. * criteria: Criteria that evaluates the specified set of arguments. String, numeric value, function call, or variable. {#simple-math-functions-table-builder__ul_lqv_124_dwb} | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_p1x_yd4_dwb}Example:

Function: COUNTIF(2,3,2,"string",2)

The result is 2.

### MODE {#simple-math-functions-table-builder__section_ixn_r24_dwb}

Returns the most frequently repeating value in the specified set of arguments.{#simple-math-functions-table-builder__table_mz2_1f4_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| MODE(argument 1,argument 2, ... argument n) | Numeric value, function call, or variable | Numeric value |
[ ]

{#simple-math-functions-table-builder__table_mz2_1f4_dwb}Example:

Function: MODE(1, 2, 2, 3, 3, 3)

The result is 3.

## String functions {#ariaid-title3}

Use string functions to reformat or perform calculations on string column
values.

### CONCATENATE {#string-functions-table-builder__section_mjk_zkn_ytb}

Joins one or more input strings
into a single string.
{#string-functions-table-builder__table_ayq_bln_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| CONCATENATE(string 1, string 2, ... string n) | String, function call, or variable | String |
[ ]

{#string-functions-table-builder__table_ayq_bln_ytb}Examples:

* Function: CONCATENATE(first_name, ".", last_name, "@", LOWERCASE(example), ".com")The
  result is the concatenated value \<first_name_value\>.\<last_name_value\>@example.com.
  In this example, \<first_name_value\> and \<last_name_value\> are
  placeholders.

* Function: CONCATENATE(first_name, " ", last_name)The result is the concatenated
  string of first_name column value and last_name column value separated by a white
  space.

{#string-functions-table-builder__ul_wfm_zc5_ytb}

### ISBLANK {#string-functions-table-builder__section_wlx_fjn_ytb}

Finds white spaces or blank values in
the string and returns true if there are any.
{#string-functions-table-builder__table_jgr_3jn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| ISBLANK(argument) | String or value | True or false |
[ ]

{#string-functions-table-builder__table_jgr_3jn_ytb}Examples:

* Function: ISBLANK("example_string")The result is false.

* Function: ISBLANK(full_name)The result is true only when there are empty spaces in
  the full_name column. Otherwise, the result is false.

{#string-functions-table-builder__ul_uk5_xb5_ytb}

### LENGTH {#string-functions-table-builder__section_wz5_pgn_ytb}

Returns the total number of characters
in the input string.
{#string-functions-table-builder__table_sz1_sgn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| LENGTH(argument) | String value, function call, or variable | Numeric value |
[ ]

{#string-functions-table-builder__table_sz1_sgn_ytb}Examples:

* Function: LENGTH("example_string")The result is 14.

* Function: LENGTH(full_name)The result is the total number of characters in the
  full_name column value.

{#string-functions-table-builder__ul_crp_c5t_ytb}

### LOWERCASE {#string-functions-table-builder__section_ufr_sjn_ytb}

Converts the input string to all
lowercase characters.
{#string-functions-table-builder__table_sc1_vjn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| LOWERCASE(argument) | String, function call, or variable | String in lowercase |
[ ]

{#string-functions-table-builder__table_sc1_vjn_ytb}Examples:

* Function: LOWERCASE("ExamPle inpuT stRing")The result is example input
  string.

* Function: LOWERCASE(sys_created_by)The result is the lower case string of the
  sys_created_by column value.

{#string-functions-table-builder__ul_dh4_gc5_ytb}

### REPLACE {#string-functions-table-builder__section_dfv_2hd_g5b}

Replaces the characters in the source
string with the characters in the target string.
{#string-functions-table-builder__table_efv_2hd_g5b__entry__3}

| Syntax | Input | Output |
|-|-|-|
| REPLACE(source_string, target_string, replacement_string) | * source_string: String, function call, or variable * target_string: String, function call, or variable * replacement_string: String, function call, or variable {#string-functions-table-builder__ul_ffv_2hd_g5b} | String |
[ ]

{#string-functions-table-builder__table_efv_2hd_g5b}Examples:

* Function: REPLACE("Pepperoni Pizza", "Pepperoni", "Cheese")The result string is
  Cheese Pizza.

* Function: REPLACE("abe.tuter@example.com", "example", company_name)The result string
  is abe.tuter@\<company_name\>.com. In this example, \<company_name\>is a place
  holder.

{#string-functions-table-builder__ul_gfv_2hd_g5b}

### TITLECASE {#string-functions-table-builder__section_zl3_l3n_ytb}

Converts the input string to all
title case characters.
{#string-functions-table-builder__table_hwc_r3n_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| TITLECASE(argument) | String, function call, or variable | String in title case |
[ ]

{#string-functions-table-builder__table_hwc_r3n_ytb}Examples:

* Function: TITLECASE("example string")The result is Example String.

* Function: TITLECASE(full_name)The result is the full name column value in the title
  case.

{#string-functions-table-builder__ul_k1z_bb5_ytb}

### UPPERCASE {#string-functions-table-builder__section_vqx_hgn_ytb}

Converts the input string to all
uppercase characters.
{#string-functions-table-builder__table_epc_lgn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| UPPERCASE(argument) | String value, function call, or variable | String in uppercase |
[ ]

{#string-functions-table-builder__table_epc_lgn_ytb}Examples:

* Function: UPPERCASE("eXamPle sTring")The result is EXAMPLE STRING.

* Function: UPPERCASE(state)The result is the State column value in upper
  case.

{#string-functions-table-builder__ul_ilr_ltt_ytb}

### FIND {#string-functions-table-builder__section_krg_xgn_dwb}

Searches for the first occurrence of a substring within a string and returns the position of the first occurrence.  
Note:  
This function is case sensitive.
{#string-functions-table-builder__table_vvp_1hn_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| FIND(search_string, source_string, from_index) | * search_string: Substring, function call, or variable. * source_string: Main string, function call, or variable. * from_index: Index position in the main string from where the search should start. Numeric value, function call, or variable. {#string-functions-table-builder__ul_pdg_dhn_dwb} | Numeric value (integer). When the substring does not exist in the main string, -1 is returned. |
[ ]

{#string-functions-table-builder__table_vvp_1hn_dwb}Example:

Function: FIND("morning", "Good morning")

The result is 5.

### SEARCH {#string-functions-table-builder__section_f4n_tc4_dwb}

Searches for a substring within a string and returns the position of the first occurrence of the substring.  
Note:  
This function is case insensitive.
{#string-functions-table-builder__table_udg_zc4_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| SEARCH(search_string, source_string, from_index) | * search_string: Substring, function call, or variable. * source_string: Main string, function call, or variable. * from_index: Index position in the main string from where the search should start. Numeric value, function call, or variable. {#string-functions-table-builder__ul_izl_cd4_dwb} | Numeric value (integer). When the substring does not exist in the main string, -1 is returned. |
[ ]

{#string-functions-table-builder__table_udg_zc4_dwb}Examples:

* SEARCH("Morning", "Good morning")The result is 5.

* SEARCH("World","Hello world!")The result is -1.

{#string-functions-table-builder__ul_pn1_3d4_dwb}

### SUBSTRING {#string-functions-table-builder__section_u5g_cqn_dwb}

Retrieves a substring from a string at the specified index position and for the specified length.{#string-functions-table-builder__table_jjp_wb4_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| SUBSTRING(source_string, start_index, length) | * source_string: String, function call, or variable. * start_index: Position in the string from where the substring is extracted. Numeric value, function call, or variable. * length: Length of the substring that should be extracted. {#string-functions-table-builder__ul_gnx_bc4_dwb} | String |
[ ]

{#string-functions-table-builder__table_jjp_wb4_dwb}Example:

SUBSTRING("Hello, Good Morning", 7, 4)

The result substring is 'Good'.

## Date and time functions {#ariaid-title4}

Use date and time functions to calculate or reformat the date and time column
values.

### NOW {#date-time-functions-table-builder__section_lqm_f3d_g5b}

Returns the current date and time of the
instance in ISO format (YYYY-MM-DD hh:mm:ss).
{#date-time-functions-table-builder__table_mqm_f3d_g5b__entry__3}

| Syntax | Input | Output |
|-|-|-|
| NOW() | No arguments are required for this function | ISO format of current date and time |
[ ]

{#date-time-functions-table-builder__table_mqm_f3d_g5b}Example:

Function: NOW()

The result is the current date and time in ISO
format.

### TODAY {#date-time-functions-table-builder__section_a4f_dnn_dwb}

Returns the current date with time offset to start of the day in ISO format in UTC time zone.{#date-time-functions-table-builder__table_mss_gnn_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| TODAY() | No arguments are required for this function | Current date with time offset to start of the day in ISO format. |
[ ]

{#date-time-functions-table-builder__table_mss_gnn_dwb}Example:

Function: TODAY()

The result is the current date and start time of the day in ISO format.

### TIMEDIFF {#date-time-functions-table-builder__section_fkr_yjn_ytb}

Evaluates the time duration
difference between two dates.
{#date-time-functions-table-builder__table_vhc_1kn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| TIMEDIFF(argument1, argument2) | Date in ISO format (YYYY-MM-DD hh:mm:ss) as string or variable | Duration |
[ ]

{#date-time-functions-table-builder__table_vhc_1kn_ytb}Examples:

* Function: TIMEDIFF("2021-05-02 9:10:12", "2021-04-07 6:2:23")The result is 25
  03:07:49.

* Formula: TIMEDIFF(sys_created_on, NOW())The result is the time duration difference
  between the sys_created_on date and the current date of the system.

{#date-time-functions-table-builder__ul_t2y_kc5_ytb}

### DATEDIF {#date-time-functions-table-builder__section_km1_13n_dwb}

Evaluates the difference between the two dates in days, months, or years.{#date-time-functions-table-builder__table_s4h_33n_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| DATEDIF(start_date, end_date, date_difference_unit) | * start_date: Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string or variable. * end_date: Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string or variable. * date_difference_unit: Character String and either "Y","M", or "D" in lowercase or uppercase. Default is "D". {#date-time-functions-table-builder__ul_wz5_k3n_dwb} | Numeric duration value based on the specified date difference unit. |
[ ]

{#date-time-functions-table-builder__table_s4h_33n_dwb}Example:

Function: DATEDIF("2021-05-02 9:10:12", "2021-05-05 6:2:23 ","d")

The result is 3.

### DATE {#date-time-functions-table-builder__section_sn2_gdn_dwb}

Creates a date from the specified individual year, month, and day values. The created date is in Coordinated Universal Time (UTC) time zone.{#date-time-functions-table-builder__table_ek1_jdn_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| DATE(year,month,day) | * year: Numeric value, variable or function. * month: Numeric value, variable or function. * day: Numeric value, variable or function. {#date-time-functions-table-builder__ul_rxg_4dn_dwb} | Date in ISO format (YYYY-MM-DD hh:mm:ss) |
[ ]

{#date-time-functions-table-builder__table_ek1_jdn_dwb}Example:

Function: DATE(2021,5,2)

The result is 2021-05-02 00:00:00.

### DAY {#date-time-functions-table-builder__section_kkg_zbn_dwb}

Retrieves the numerical day component from the specified date.{#date-time-functions-table-builder__table_f1h_2cn_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| DAY(date) | Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string, variable, or function. | Numeric value (integer). The values range from 1 through 31. |
[ ]

{#date-time-functions-table-builder__table_f1h_2cn_dwb}Examples:

* Function: DAY("2021-05-029:10:12")The result is 2.

* Function: DAY(NOW())The result will be the day component of the current date and
  time.

{#date-time-functions-table-builder__ul_z1q_wcn_dwb}

### MONTH {#date-time-functions-table-builder__section_uxz_cfp_dwb}

Retrieves the numerical month component from the specified date.{#date-time-functions-table-builder__table_gr4_khp_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| MONTH(date) | date: Date in ISO format (YYYY-MM-DD or YYYY-MM- DD hh:mm:ss) as string or variable. | Numeric value (integer). The values range from 1(January) through 12(December). |
[ ]

{#date-time-functions-table-builder__table_gr4_khp_dwb}Examples:

* Function: MONTH("2021-05-02 9:10:12")The result is 5.

* Function: DAY(NOW())The result will be the month component of the current date and
  time.

{#date-time-functions-table-builder__ul_wj5_thp_dwb}

### YEAR {#date-time-functions-table-builder__section_cpy_xym_dwb}

Retrieves the year component from the specified date.{#date-time-functions-table-builder__table_d3g_2zm_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| YEAR(date) | Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string, variable, or function. | Numeric value (integer) |
[ ]

{#date-time-functions-table-builder__table_d3g_2zm_dwb}Examples:

* Function: YEAR("2021-05-02 9:10:12")The result is 2021.

* Function: YEAR(NOW())The result will be the year component of the current date and
  time.

{#date-time-functions-table-builder__ul_mnv_4zm_dwb}

### WEEKDAY {#date-time-functions-table-builder__section_x3r_qjn_dwb}

Returns the numerical day of the week for the specified date. The day range is 1 (Sunday) through 7 (Saturday).{#date-time-functions-table-builder__table_acd_sjn_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| WEEKDAY(date) | date: Date in ISO format (YYYY-MM-DD or YYYY-MM- DD hh:mm:ss) as string or variable. | Numeric value (integer) |
[ ]

{#date-time-functions-table-builder__table_acd_sjn_dwb}Example:

Function: WEEKDAY("2021-05-02 9:10:12")

The result is 1.

### TEXT {#date-time-functions-table-builder__section_emz_b1n_dwb}

Retrieves the specific date components in a date in string format.{#date-time-functions-table-builder__table_znr_d1n_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| TEXT(date, format_text) | * date: Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string, variable. * format_text: Date components as string or variable that are to be extracted. {#date-time-functions-table-builder__ul_lzb_n1n_dwb} | String |
[ ]

{#date-time-functions-table-builder__table_znr_d1n_dwb}Example:

TEXT("2022-08-17 9:10:12","yyyy-MM")

The result is 2022-08.

### DATEVALUE {#date-time-functions-table-builder__section_qzy_3n4_dwb}

Converts a date in text format into a date in ISO format.{#date-time-functions-table-builder__table_opb_d44_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| DATEVALUE(date_text) | date_text: Date stored as text must be in YYYY-MM-DD format. | Date in ISO format (YYYY-MM-DD hh:mm:ss) as string. |
[ ]

{#date-time-functions-table-builder__table_opb_d44_dwb}Example:

Function: DATEVALUE("2021-05-02")

The result is 2021-05-02 00:00:00.

### WORKDAY {#date-time-functions-table-builder__section_cb3_ydn_dwb}

Returns the nearest working day for the specified input date by excluding the specified holidays and weekends before or after the specified n number of days.{#date-time-functions-table-builder__table_zyw_b2n_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| WORKDAY(start_date, days, holiday 1,holiday 2, ..., holiday n) | * start_date: Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string or variable. * days: Number of days as a numeric value, string, or function. * holiday 1...holiday n (Optional): Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string or variable. {#date-time-functions-table-builder__ul_lhw_h2n_dwb} | Date in ISO format (YYYY-MM-DD hh:mm:ss) as string. |
[ ]

{#date-time-functions-table-builder__table_zyw_b2n_dwb}Example:

Function: WORKDAY("2022-08-17 9:10:12",2)

The result is 2022-08-19 00:00:00.

### NETWORKDAYS {#date-time-functions-table-builder__section_trs_4f4_dwb}

Calculates the number of working days between two dates by excluding weekends and specified holiday dates. Number of working days includes the start date and end date.{#date-time-functions-table-builder__table_opy_qf4_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| NETWORKDAYS(start_date,end_date,holiday 1,holiday 2, ... holiday n) | * start_date: Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string or variable. * end_date: Date in ISO format (YYYY-MM-DD or YYYY-MM-DD hh:mm:ss) as string or variable. * holiday 1,holiday 2, ... holiday n (optional) : List of holidays that should be excluded while calculating working days. {#date-time-functions-table-builder__ul_ilg_5f4_dwb} | Numeric value (integer) |
[ ]

{#date-time-functions-table-builder__table_opy_qf4_dwb}Example:

Function: NETWORKDAYS("2022-08-17 20:10:12","2022-08-19 9: 10:12")

The result is 3.

## Logical functions {#ariaid-title5}

Use logical functions to perform logical operations on column values.

### AND {#logical-functions-table-builder__section_hh1_fln_ytb}

Performs a logical AND operation on the
arguments.
{#logical-functions-table-builder__table_skg_224_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| AND(argument 1, argument 2) | String, function call, or variable | True or false |
[ ]

{#logical-functions-table-builder__table_skg_224_ytb}Examples:

* Function: AND(2\>3, 4\<5) The result is false.

* Formula: AND(LENGTH(sys_created_by)\>25, LENGTH(sys_updated_by)\>25)The result is true
  only when the number of characters in both the sys_created_by and sys_updated_by columns
  are greater than 25. Otherwise, the result is false.

{#logical-functions-table-builder__ul_oh3_kd5_ytb}

### IF {#logical-functions-table-builder__section_nk5_wgn_ytb}

Executes the specified statements based on
the Boolean output of the conditional expression.
{#logical-functions-table-builder__table_pt3_zgn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| IF(\<conditional_expression\>, \<do_this_when_true\>, \<do this_when_false\>) | * conditional_expression: Logical conditional expression, function call, or variable Note: Logical comparison of strings is not supported in the conditional expression. * do_this_when_true: String, numeric value, function call, or variable that is returned when the condition evaluates to true * do_this_when_false: String, numeric value, function call, or variable that is returned when the condition evaluates to false {#logical-functions-table-builder__ul_rl2_fhn_ytb} | String, numeric value, function call, or variable based on the Boolean output of the conditional expression. |
[ ]

{#logical-functions-table-builder__table_pt3_zgn_ytb}Examples:

* Function: IF(number_of_incidents \>= 5, "High", "Medium")If the number of incidents is
  greater than 5, the string 'High' is returned. In other cases, the string 'Medium' is
  returned.

* Function: IF(LENGTH(full_name) \> 100, "Number of characters exceed the limit", "Number of characters within the limit")If the number of characters for the full_name column is
  above 100, the string 'Number of characters exceed the limit' is returned. Otherwise,
  the string 'Number of characters within the limit' is returned.

{#logical-functions-table-builder__ul_jhw_n5t_ytb}

### OR {#logical-functions-table-builder__section_bxk_qhn_ytb}

Performs logical OR operation on the
arguments.
{#logical-functions-table-builder__table_nsw_shn_ytb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| OR(argument 1, argument 2) | Conditional expression, function call, or variable | True or false |
[ ]

{#logical-functions-table-builder__table_nsw_shn_ytb}Examples:

* Function: OR(2\>3,4\<5) The result is true.

* Formula: OR(LENGTH(first_name)\>25, LENGTH(last_name)\<25)The result is true when
  the number of characters in the first_name column is greater than 25 or the number
  characters in the last_name column is less than 25. Otherwise, the result is
  false.

{#logical-functions-table-builder__ul_r3c_hvt_ytb}

### IFERROR {#logical-functions-table-builder__section_tmx_nln_dwb}

Evaluates expression 1 and returns the expression 1 value when there are no errors in the expression 1. When an error occurs while evaluating expression 1, expression 2 is evaluated and expression 2 value is returned. {#logical-functions-table-builder__table_wgl_rln_dwb__entry__3}

| Syntax | Input | Output |
|-|-|-|
| IFERROR(expression 1, expression 2) | * expression 1: Arithmetic, Logical expression, function call, String, numeric value or variable. * expression 2: Arithmetic, Logical expression, function call, String, numeric value or variable. {#logical-functions-table-builder__ul_b5r_tln_dwb} | Result of expression 1 when there are no errors in expression 1. Otherwise, result of expression 2. |
[ ]

{#logical-functions-table-builder__table_wgl_rln_dwb}Example:

Function: IFERROR( MULTIPLY(snr_factor, signal), MULTIPLY( default_factor, signal))

If the snr_factor value is a valid number, the multiplied value of snr_factor with signal
is returned. If the snr_factor value is not a valid number, the multiplied value of
default_factor value with signal is returned.

