How do I convert string to Indian Money format?

前端 未结 4 842
感动是毒
感动是毒 2020-12-01 22:13

I am trying to convert string to India Money format like if input is \"1234567\" then output should come as \"12,34,567\"

I have written following code but its not g

4条回答
  •  借酒劲吻你
    2020-12-01 22:29

    If you want to show in Razor view file, then use,

    @String.Format(new System.Globalization.CultureInfo("hi-IN"), "{0:c}", decimal.Parse("12345678", System.Globalization.CultureInfo.InvariantCulture))
    
    // Output: ₹ 1,23,45,678.00
    

提交回复
热议问题