Search code examples
c#datetimehindi

how to convert date in to hindi date for example 7 march 2011 to ७ मार्च २०११


I am developing a Win Form application using C#. The application shows some information in English and Hindi.

How can I convert date in to Hindi?

For e.g. 7 march 2011 to ७ मार्च २०११ so that it can be displayed on a label.

belateText = System.DateTime.Now.ToString("dd-MMM-yyyy");

Solution

  • DateTime.Now.ToString("D", new CultureInfo("hi"));
    

    returns 30 नवम्बर 2013

    And if you want to see the digits in hindi, you would need to have the hindi language pack installed on the machine.