Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8582727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:21:50+00:00 2026-06-11T21:21:50+00:00

I am trying to convert string to India Money format like if input is

  • 0

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 giving the expected output.

 CultureInfo hindi = new CultureInfo("hi-IN");
 string text = string.Format(hindi, "{0:c}", fare);
 return text;

can anyone tell me how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:21:51+00:00Added an answer on June 11, 2026 at 9:21 pm

    If fare is any of int, long, decimal, float or double then I get the expected output of:

    ₹ 12,34,567.00.

    I suspect your fare is actually a string; strings are not formatted by string.Format: they are already a string: there is no value to format. So: parse it first (using whatever is appropriate, maybe an invariant decimal parse), then format the parsed value; for example:

    // here we assume that `fare` is actually a `string`
    string fare = "1234567";
    decimal parsed = decimal.Parse(fare, CultureInfo.InvariantCulture);
    CultureInfo hindi = new CultureInfo("hi-IN");
    string text = string.Format(hindi, "{0:c}", parsed);
    

    Edit re comments; to get just the formatted value without the currency symbol or decimal portion:

    string text = string.Format(hindi, "{0:#,#}", value);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert a string into money format using this function , and
I'm trying to convert a string into a date format My string looks like
I am trying to convert a string of this format: MM/dd/yyyy HH:mm The input
I'm trying to convert string to date format.I trying lot of ways to do
I'm trying to convert a string like 'a?(b?c:d):e' to another string 'ifthenelse(a,ifthenelse(b,c,d),e)' using the
I'm trying to convert String like 01010100 to the element from ASCII table. I
I'm trying to convert specific String to a byte[]. The String looks like: 55
I am trying to convert a String in ISO timestamp format to a SimpleDateFormat
I'm trying to convert a string like this: %D7%90%D7%93%D7%99, using PHP. to Hebrew (so
I'm trying to convert a string to datetime to validate if user input is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.