Copied to clipboard

Flag this post as spam?

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


  • Saba Tandashvili 29 posts 181 karma points
    Jan 23, 2019 @ 08:50
    Saba Tandashvili
    0

    Culture for decimal type variables

    Hi, I have property Latitude with type decimal in my database. When i select from database it comes with comma not with dot.

    For example it is 44,795032 now, it should be 44.795032 because i need this variable in google maps, javascript asks variable to be number.

    InvalidValueError: property lat: not a number

    I tried changing comma with dot in C#, here is code below, but it doesn't works. Any suggestions ?

    decimal parsedValue = Decimal.Parse(aTMsAndBranchesLatitude, NumberStyles.Any, CultureInfo.InvariantCulture);
    
Please Sign in or register to post replies

Write your reply to:

Draft