---
description: >-
  A data type is an attribute that specifies the type of data that the object
  can hold: integer data, character data, monetary data, date and time data,
  binary strings, and so on.
---

# Data Types

The properties of a field describe the characteristics of data added to that field. A field's data type is the most important property because it determines what kind of data the field can store.

You can find more detailed information at [https://docs.microsoft.com/en-us/dotnet/api/system.data.sqldbtype?redirectedfrom=MSDN\&view=net-6.0](https://docs.microsoft.com/en-us/dotnet/api/system.data.sqldbtype?redirectedfrom=MSDN\&view=net-6.0)

<table><thead><tr><th width="150">Data Type</th><th width="528.4285714285713">Description</th></tr></thead><tbody><tr><td>Bool</td><td>A logical field can be displayed as Yes/No, True/False, or On/Off.</td></tr><tr><td>Byte</td><td>An unsigned 8-bit integer value from 0 to 255</td></tr><tr><td>Byte[]</td><td>An array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes.</td></tr><tr><td>DateTime</td><td><p>A date and time combination. Format: YYYY-MM-DD hh:mm:ss. </p><p>Can represent date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds.</p></td></tr><tr><td>Decimal</td><td><p>A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. The total number of digits is specified in size. The number of digits after the decimal point is specified in the parameter.<br><br><img src="https://content.gitbook.com/content/4qoenWmth4wZNXJmDDGY/blobs/twS3Kd5xrDDF00wkAyPD/ComUnity-v4-ERD-AddEntityProperties-PropType%20Decimal.png" alt=""><br><br>Extra options are provided to define the decimal more precisely:</p><ul><li><strong>Precision</strong> is the number of digits in a number. </li><li><strong>Scale</strong> is the number of digits to the right of the decimal point in a number. <br><em>For example, the number 123.45 has a precision of 5 and a scale of 2.</em></li></ul><p>In SQL Server, the default maximum precision of <strong>numeric</strong> and <strong>decimal</strong> data types is 38. In earlier versions of SQL Server, the default maximum is 28.<br><br>To learn more about this data type, go to <a href="https://docs.microsoft.com/en-us/sql/t-sql/data-types/precision-scale-and-length-transact-sql?view=sql-server-ver15">https://docs.microsoft.com/en-us/sql/t-sql/data-types/precision-scale-and-length-transact-sql?view=sql-server-ver15</a></p></td></tr><tr><td>Double</td><td>Double-precision floating-point. Will handle most decimals</td></tr><tr><td>Float</td><td>Floating-point data types, usually represent values as high-precision fractional values. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1.</td></tr><tr><td>Guid</td><td>The GUID data type is useful when you want to uniquely identify some data, so that it can be exchanged with external applications. The correct format of the GUID string is {CDEF7890-ABCD-1234-ABCD-1234567890AB} where 0-9, A-F symbolizes hexadecimal digits.<br><br>To learn more about this data type, go to <a href="https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/guid/guid-data-type#format">https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/guid/guid-data-type#format</a></td></tr><tr><td>Int</td><td>A 32-bit signed integer representing a whole number between -32,768 and 32,767</td></tr><tr><td>Long</td><td>A whole number between -2,147,483,648 and 2,147,483,647</td></tr><tr><td>Sbyte</td><td>The SByte data type represents integers with values ranging from negative 128 to positive 127.</td></tr><tr><td>Short</td><td>The Short Int16 data type represents signed integers with values ranging from negative 32768 through positive 32767.</td></tr><tr><td>String</td><td><p>A FIXED length string that may contain letters, numbers, and special characters up to a maximum of 4000 characters. </p><ul><li><em>When you select this data type you may define the maximum length and the minimum length of the string.</em></li><li><em>When you select the data type &#x3C;string> the following two properties are added to the properties editor.</em> <br><br><img src="https://content.gitbook.com/content/4qoenWmth4wZNXJmDDGY/blobs/AHT8lDxGPbxFnXkGXirD/ComUnity-v4-ERD-AddEntityProperties-PropType%20String-MaxLen.png" alt=""><br><br><img src="https://content.gitbook.com/content/4qoenWmth4wZNXJmDDGY/blobs/EuezkX2ihYd06wTk9Imr/ComUnity-v4-ERD-AddEntityProperties-PropType%20String-MinLen.png" alt=""><br><br>Learn more about this data type at <a href="https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string">https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string</a></li></ul></td></tr><tr><td>TimeSpan</td><td>The timespan (time) data type represents a time interval, where a number of formats are supported for <em>value</em>, as shown at <a href="https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan">https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan</a></td></tr></tbody></table>

