cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to convert STRING data into NUMBER to be used in chart ?

Nuttapol
11-Garnet

How to convert STRING data into NUMBER to be used in chart ?

I want to extract data from infotable to be used in chart but my data is STRING.

how can i convert this data to be NUMBER to be used in chart? please suggest me how to do.

sssss.png

eeee.png

bbbb.png

This is My data from CSV file.

Inverter type;Serial number;RS485 address;IP address;Yield[kWh]

Time;Udc1;Idc1;Pdc1;Uac1;Iac1;Uac2;Iac2;Uac3;Iac3;Pdc;Pac;Tsys[?C]

06:38:35;620.4;1.84;1147;227.6;2.02;225.8;1.92;226.6;2.13;1147;1124;37.4

06:43:40;625.5;2.36;1477;227.2;2.43;225.4;2.38;226.2;2.52;1477;1448;38.5

06:48:40;630.5;2.85;1797;226.8;2.86;225.1;2.84;226.0;2.93;1797;1760;39.5

06:53:40;633.3;3.27;2072;227.1;3.21;225.5;3.23;226.2;3.28;2072;2030;37.8

06:58:40;641.0;3.74;2400;227.0;3.69;225.2;3.70;226.1;3.74;2400;2352;37.2

07:03:40;663.0;4.39;2911;229.2;4.37;227.5;4.39;228.3;4.41;2911;2856;37.5

07:08:40;697.1;5.03;3510;227.2;5.26;225.4;5.28;226.4;5.29;3510;3437;38.1

07:13:40;688.5;5.23;3606;226.3;5.42;224.5;5.44;225.5;5.44;3606;3533;38.5

07:18:40;706.8;5.53;3910;226.6;5.84;225.0;5.86;226.0;5.86;3910;3833;39.0

07:23:40;674.7;5.59;3774;226.3;5.65;224.8;5.68;225.7;5.67;3774;3697;39.2

07:28:40;687.8;5.93;4080;225.8;6.09;224.2;6.13;225.1;6.10;4080;3999;39.5

07:33:40;669.0;6.13;4105;226.1;6.13;224.6;6.17;225.4;6.11;4105;4023;39.7

07:38:42;697.2;7.17;5000;226.4;7.40;225.0;7.45;225.9;7.41;5000;4901;40.1

07:43:42;699.0;7.80;5452;227.3;8.00;225.8;8.06;226.7;8.02;5452;5342;40.6

07:48:42;698.1;9.57;6681;226.3;9.79;224.8;9.86;225.6;9.81;6681;6546;41.1

3 REPLIES 3
ankitgupta
5-Regular Member
(To:Nuttapol)

Hi Nuttapol Pomtong​,

Is it working when the DataShape is both String?

The number of Properties in DataShape and CSV is different.

yes it work when both are String but i want to use with Label chart.

ankitgupta
5-Regular Member
(To:Nuttapol)

Hi Nuttapol Pomtong​,

You use one of the function below to convert String to number/Integer/Float based on your requirement:

var MyNumber1 = Number("1000");

var MyNumber2 = parseInt("1000");

var MyNumber3 = floor(parseFloat("1000.01"));


I hope it helps.

Top Tags