Data Types
- 03:06
Learn the importance of data types in tables, such as text, number, date/time, or Boolean. Understand how data types determine formatting and allowable values, and the common data types used in tables.
Downloads
No associated resources to download.
Glossary
Alphanumeric Boolean Data Types Date Numeric String TextTranscript
Data Types In a table data is stored in columns.
Each of these columns is normally assigned a data type. That could be text, could be number, date time, or even Boolean.
The data type is really important. It will determine not only what formatting can be done on the values, but also what values can even be stored in the column in the first place.
One of the most common data types is text.
Text data type means you can store alpha numeric characters. So that would be letters numbers are even punctuation and spaces.
So typically something like company a name or address would be a text field.
You can't perform mathematical calculations on a text field. You can perform some calculations and formulas which would parse or extract certain characters from the text but nothing such as sum, average, and so on it would need to be a numeric data type for that.
They're really good for searching. However, so if you have a text field, then you can easily search for exact values or a partial match. So for example find all the rows where the ISIN begins with F.
Numeric data types are really common as well. So we tend to have lots of numeric columns market price amount value transaction amount and so on.
Numbers can be different types. So we could have whole numbers, we could have decimal numbers, fixed numbers depending on the software you're using there will be a range of numeric data types available.
It's really important if you're going to calculate with your data that it's numeric and if you do have decimal numbers then make sure that it's using a decimal data type. So you don't lose any of the data. If you have a numeric data type field, then you can format it to currency percentage style or comma style there's a whole range available.
Another common data type is date or time, date/time data types are really common as well. So we could have for example trade dates, we could have date of births. We could have transaction dates in our table and they can be divided into years months and days so we can for example work with just the rows where the year is 2021 or only the rows where the month is July.
It's very easy to search through, filter, or calculate with dates. When we calculate it with dates, we might subtract one date from the other to find the duration. It's also important when we enter a date into our column that it's entered as a correct it so for example in Excel we would not be able to use a full stop to enter the date. We would need to type it with the forward slash. Otherwise, it won't be assigned the data type.