# Data Types of Values Referenced by Formulas

In Kintone, data types vary depending on the types of fields and calculated results. Operators and functions you can use for each data type are also different.

Understanding the data types enables you to make use of fields, operators, and functions in various formulas.

## Data Types of Fields

When fields are referenced in a formula, their values are treated as the following data types.

Field | Data type |
---|---|

Number | Numeric type |

Calculated | |

Date and time | |

Date | |

Time | |

Created datetime | |

Updated datetime | |

Lookup (If the lookup source is a numeric type) | |

Text | String type |

Drop-down | |

Radio button | |

Lookup: (If the lookup source is a string type) | |

Created by | |

Updated by | |

Check box | Array string type |

Multi-choice | |

A string type field in a table when it is referenced by a field placed outside the table | |

A numeric type field in a table when it is referenced by a field placed outside the table | Array numeric type |

## Data Types of Calculated Results

The following table shows the data types of values returned by functions and operators in formulas.

Function | Data type |
---|---|

SUM | Example: SUM(1, 2, 3) The data type of the arguments is either numeric or array numeric, and the data type of the calculated result is numeric. |

ROUND | Example: ROUND(A*1.1) The data type of the argument and the calculated result is numeric. |

ROUNDUP | Example: ROUNDUP(A*1.1) The data type of the argument and the calculated result is numeric. |

ROUNDDOWN | Example: ROUNDDOWN(A* 1.1) The data type of the argument and the calculated result is numeric. |

IF | Example: IF(A=100,B,C) The first argument is the boolean type. The second and third arguments are any one of the numeric, string, or boolean type. The data type of the value returned from the function is the same as that of the calculated result of either the second or third argument. |

AND | Example: IF(AND(A>10,B>=10),"1","0") The data type of the arguments and the calculated result is boolean. |

OR | Example: IF(OR(A>10,B>=10),"1","0") The data type of the arguments and the calculated result is boolean. |

NOT | Example: IF(NOT(A>10),"1","0") The data type of the arguments and the calculated result is boolean. |

DATE_FORMAT | Example: DATE_FORMAT(1522972800, "YYYY-M-d", "system") The first argument is the numeric type (UNIX time), the second argument is the string type (display format), and the third argument is the string type (timezone). The data type of the calculated result is string. |

YEN | Example: YEN(1100.5, 0) The data type of the arguments is numeric, and the data type of the calculated result is string. |

CONTAINS | Example: IF(CONTAINS(Workday, "Sunday"), "Working on Sunday", "Not Working on Sunday") The first argument is the array string type, and the second argument is the string type. The data type of the calculated result is boolean. |

Operator | Data type |
---|---|

+, -, *, /, ^ | The data type of arguments and the calculated result is numeric. |

& | The data type of arguments is any of numeric, string, or boolean. The data type of the calculated result is string. |

=, !=, <> | The data type of arguments is any of numeric, string, or boolean. The data type of the calculated result is boolean. |

<, <=, >, >= | The data type of arguments is numeric. The data type of the calculated result is boolean. |

For details on operators, functions, and their usage, refer to the following pages.