When I import a column from sql with percentage data (e.g. 10%) it imports them as string and when I change to float the number is changed to 10 - instead of 0.1 - please help - maybe I need to set column type in sql for this?
You can't import a cell that has anything else but numbers, and convert it to a numeric column.
Data that contains anything except for numbers will be converted into strings, and the plugin cannot calculate this in your stead. It simply doesn't recognize a % sign, and calculate that 10% = 0.1 in float.
You need to add this data manually, or use it as string-type columns.
Hi,
When I import a column from sql with percentage data (e.g. 10%) it imports them as string and when I change to float the number is changed to 10 - instead of 0.1 - please help - maybe I need to set column type in sql for this?
Hello Dave
You can't import a cell that has anything else but numbers, and convert it to a numeric column.
Data that contains anything except for numbers will be converted into strings, and the plugin cannot calculate this in your stead. It simply doesn't recognize a % sign, and calculate that 10% = 0.1 in float.
You need to add this data manually, or use it as string-type columns.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables