18. Working with Data Types and Data Display Formats : Data Display and Input Formats : Data Types and Display Formats
Share this page                  
Data Types and Display Formats
When you create a column in a database table, you assign a data type to control the way data is stored in that column. Sample data types for Ingres databases include char, integer, date, and money. When you create a report or form, you can specify a display format to determine the way that data appears on a form or in a report.
You can assign a display format for data stored in a database table as a given data type. For example, a number stored as an integer data type can be displayed as a whole number, in decimal notation, in scientific notation, or as a right‑justified number. The data display format must be of a type that is compatible with the data type for the corresponding column in the database table.
Even though some data types and display formats have the same name and abbreviated symbol, they perform different functions. For example, there is a floating point (f) data type and a floating point (f) display format. You can display a floating point data type in formats other than the floating point format. You can also use the floating point display format for numeric data stored as data types other than floating point.
Specify any display format that is appropriate for the data type in both display-only and data entry fields. After the user enters data in a data entry field as instructed by the application, the data is redisplayed in the specified format. An input masking format, or input template, is a special display format you can use in data entry fields only. It controls how a user enters data on a form, character by character. Date, numeric, and string templates are allowed as input masking formats in data entry fields.
The following table lists the valid display and input formats for any data type in each data type category. The letter in parentheses is the code or symbol by which you specify the display format.
Data Type Category
Valid Display and Input Formats
Display Formats
Input Masking Formats
Character (c)
String template
Integer (i)
Floating Point (f)
Scientific (exponential) Notation (e)
Decimal or Scientific (g)
Numeric template
Numeric template
Right‑justified decimal or scientific (n)
Numeric template
Numeric template
Character (c)
Date (d)
Date template (d), with some restrictions