Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Add decimal to value


Makada Oct 21, 2019 11:49 AM

Hi,

I would like to have an average data value, when the value is a non decimal value, shown in one or two decimal places.

Now, when the value is non decimal at time, e.g. solar 150, it is shown as 150.

(While it shows 150,3 for example ok.)

But i want to have it display 150,00

How can i accomplish this in crbasic?

With kind regards.


meteor Oct 21, 2019 12:41 PM

Hi,

what's about Sprintf?

e.g. Sprintf(target,"%3.2f%",value)

Greetings


smile Nov 7, 2019 06:48 AM

Hi,

What do you mean? display in numeric or historical data?

Smile


Makada Nov 7, 2019 07:01 AM

Hi,

I have set the datatype to IEE4 so the possibility of having a average of e.g. 150 is small, will mostly have some digits behind the, .

Do you have a solution for my other post about the daily Timestamp?

Ive set the output option to midnight is 2400.

So the data in the daily dat file is showing 2019-11-6 24:00:00

But in my rtmc graphs with daily data from that dat file its showing the data from today instead of 6th of november...

Cheers.

Log in or register to post/reply in the forum.