Data types and display formats

Data types govern how data is stored internally, and display formats control how that data is displayed.

Each column in a 1010data Insights Platform table contains data of a particular category, such as numbers, dates, times of day, or alphanumeric text. The type of values determines the data type of the column.

In the Insights Platform, these values (numbers, dates, times, alphanumeric values) are stored in one of the simple data types: integer, big integer, decimal, and text. The way in which these values are displayed is defined by the display format specified for the column in which those values reside. The way the values are displayed is not necessarily similar to or the same as how the values are stored.

For example, the value 1,234.56 contains a comma, but the internal value is just a decimal number (1234.56). Commas may aid how the values are read by users, but they are not included in the data that is stored. Furthermore, although two decimal places are displayed, the stored value may be more precise. Though the number appears to be 1234.56, it may actually be 1234.55574. Displaying the number rounded to two decimal places is part of the column's display format.

It may or may not be easy to tell what the data type of a column is by looking at it. For instance, 123 might be an integer, text, or a decimal number with a display format that shows no decimal places, i.e., dec:0.

Another example that shows the difference between how a value is represented in the 1010data Insights Platform and how it appears in the table view is dates and time. A date is simply stored as an integer in the date form (YYYYMMDD). The display format identifies the value as a date and displays it as such. For instance, a number such as 20031115 may be displayed as:

  • 11/15/03 using the date display format.
  • 11/15/2003 using the date4y display format.
Time is also stored as an integer in the time form (HHMMSS). A number like 224556 can be displayed as:
  • 10:45:56p using the hms12 display format.
  • 22:46 using the hm24 display format.

Because dates and times are stored as integers, the platform technically allows these columns to be summed or added to other numeric columns; however, the results are generally meaningless. To do arithmetic with such columns, use the functions provided for this purpose, e.g., to add a number of days to a date, use shift(X;Y). For more information, see shift(X;Y).