Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 9 Monaten
Beteiligte Autoren:
Allard, Ola, Frans

2 decimals

Startbeitrag von Allard am 07.09.2015 14:18

Hi I Have a problem,
I had a field that was defined as an int. But I need it to be a nummeric, because I need two decimals.

So I went to the analisis and changed the field to type = decimal.
interger part 32 decimal part 2

I ran the analisis update and I semd to change things.

Now I f I run a querie I get a result with no decimals. The result is 21. I need it to be 21.00

Anyone any I dea how to fix this ?




Hello Allard,

What do you mean? The number is stil 21 but when you devide it by 5 it would be represented as: 4.2 and not 4.20.
In that case what is the problem? In a table display you can set it to two decimals nad it displays two decimals.

von Frans - am 07.09.2015 19:35
Hi Allard,

Also take a look at NumToString, which allows you to format a numeric value in many different ways, including specifying the number of decimals:


Best regards

von Ola - am 08.09.2015 10:10

I needed it because I had to do a check againsed an xml import I now use val(item) and it works. I Still think it is strage that even with a real with 2 decimals in the analisis returns no decimals if decimals are 0 in queries.

Indeed frans in my table it has 2 decimals. And it is saved with 2 decimals in hyperfile cs. So that is good, works as expected. But i f I run a querie it returns 21 instead of 21,00.

But my problem is solved

Thanks for the response


von Allard - am 08.09.2015 18:39
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.