Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tony Lorentzen 85 posts 174 karma points
    Feb 05, 2021 @ 22:22
    Tony Lorentzen
    0

    Decimal property types and culture

    Something is rotten... I'm experiencing some issues related to decimal values. I use it to store a product's price in DKK (Danish kroner). Looking into the database, I see a value like "1500.0000". Opening the Umbraco Backoffice that value is shown in the editor as 1500. The UI and culture code on the website is "da-dk" (Danish) where we use the dot as a thousands-separator, so printing out the value on the website it reads as 15000000 which obviously is totally wrong. However, if I open the document in the backoffice and do a "Save & publish", it will read as 1500 in Umbraco.config. However - if I simply right-click the node for the page (without opening the document in the editor) and click "publish" it will put "1500.0000" in the Umbraco.config. The same happens for all values if I "republish entire site". What am I doing wrong?

Please Sign in or register to post replies

Write your reply to:

Draft