Data type prefixes
Data type prefixes are added to field names in the first data record. Use the prefixes to set field data types.
Available prefixes
| Name | Description | 
|---|---|
| - | The field will be of the number type. | 
| + | The field will be of the string type. | 
| d+ | The field will be a date divided into 3 subfields: Year, Month, Day. | 
| D+ | The field will be a date represented as a multilevel hierarchy with the following levels: Year > Month > Day. | 
| D4+ | The field will be a date represented as a multilevel hierarchy with the following levels: Year > Quarter > Month > Day. | 
| ds+ | The field will be a date displayed in the "dd/MM/yyyy"format. | 
| dt+ | The field will be a date displayed in the "dd/MM/yyyy HH:mm:ss"format. | 
| t+ | The field will be a time interval displayed in the "HH:mm:ss"format. | 
| m+ | The field will be of the month type. Natural sorting is applied to field members. | 
| w+ | The field will be of the weekday type. Natural sorting is applied to field members. | 
Examples
1) Here is a sample CSV data where the ds+ and w+ prefixes are added to the field names:
ds+Invoice Date, Quantity, Country, w+Week Day 2018-05-15, 3, France, Tuesday 2018-05-16, 4, Italy, Wednesday 2018-05-17, 2, Spain, Thursday 2018-05-12, 2, Japan, Saturday
After loading the CSV data and selecting fields in the Field List, you can see that the Invoice Date is displayed as a string in the "dd/MM/yyyy" format, and the Week Day is interpreted as a day of the week:
2) You can represent a date as a multilevel hierarchy using the D+ or the D4+ prefix.
Here is an example with the D+ prefix:
D+Invoice Date, -Quantity, -Price, +Country 2018-05-15, 3, 329, France 2018-05-16, 4, 139, Italy 2018-05-17, 2, 429, Spain 2018-05-12, 2, 559, Japan
See how the Invoice Date is displayed in the pivot table when the CSV file is loaded to WebDataRocks:
This demo is also available on our CodePen.
To create multilevel hierarchies from fields of other types, refer to the Creating multilevel hierarchies guide.