# Data Types of Values That Are Referred by Formulas

In kintone, data types vary depending on the fields and calculated results. The operators and functions that you can use for each data type are also different.
Understanding data types enables you to apply different data types to different calculations.

## Data Types for Fields

If you refer to some fields in formulas, their values are treated as the following data types.

Fields 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
Lookup: (If the lookup source is a string type)
Created by
Updated by
Check box Array string type
Multi-choice
String type field in a table when it is referred by the field outside the table
Numeric type field in a table when it is referred by the field outside the table Array numeric type

## Data Types for Calculated Results

The following table shows the data types of the values that are returned from functions and operators in the 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 a boolean type, and the second and the third arguments are any of the numeric, string, or boolean types.
The return value from the function is the data type of the calculated result of the second and third arguments.
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 a numeric type(UNIX time), the second argument is a string type(display format), and the third argument is a 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 an array string type, and the second argument is a string type. The data type of the calculated result is boolean.
Operator Data Type
+, -, *, /, ^ The data type of the arguments and the calculated result is numeric.
& The data type of the arguments is numeric, string, or boolean. The data type of the calculated result is string.
=, !=, <> The data type of the arguments is numeric, string, or boolean. The data type of the calculated result is boolean.
<, <=, >, >= The data type of the 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.