Click here to Skip to main content
13,450,520 members (59,435 online)
Click here to Skip to main content
Add your own
alternative version


41 bookmarked
Posted 9 Jan 2007

Indian Number & Date Format

, 29 Aug 2012
Rate this:
Please Sign up or sign in to vote.
A control for Indian number format, converts number to words, Hindi words, comma style and Indian date processor


Indian.dll control is a control for applications which need the data to be formated in Indian formats/national language (Hindi). It's very useful if you are working with windows (which still does not support Indian formats). This will format the data (numbers) in Indian comma style (eg. 9,999/-), Indian words in English as well as Hindi(eg. one lac only) and formats the date independent of system settings to dd-MM-yyyy (not for display, but storage and calculations). Furthermore, it displays the numbers with the new currency symbol for the rupee.

This program is also useful if you have data in Indian format, to be converted in to integer

Using the Code

To use this control, reference the control and start formatting the data, to suit your needs.

To convert data in Indian format to integer

// There is a function defined called getVal in the namespace Indian.IndianCurrency

int i=Indian.IndianCurrency.getVal("Rs. 99,999/-");

// This will return 99999 to the integer

To convert date from system format to Indian format

// There is a function defined called date in the namespace Indian.IndianDate


// This will return 01-02-2003 (dd-MM-yyyy)
// To get the data in other format, you can specify the "Input Format" to get desired result
// For example:

int"1/2/3", "MM/dd/yyyy");

// This will return 01/02/2003 equivelent to 02-01-2003 (dd-MM-yyyy)

To create a new translation in the XML file.

// Section Encapsulates the language information

 < Section Name="Marathi" > ... < / section >

// Fill in the all the values for the "Key Name"
// For example: 

< Key Name="Rupees" Value="रुपये" / >

// Save the file in UTF-8 encoding. Supports multiple languages and hence no 
// limit on the number of sections that can be created.

Download a sample program to play with it, you will see some more examples there to reach all results as shown in images above. 

Points of Interest

I was baffled when I used to get different results of my invoice program from the same data. This was, since all the storage was made in system format. Since then I learnt that one must follow a rule to save date (at least) in a particular format itself. After using it in several programs, I learnt it to be very useful for many programers and hence I decided to write this article.

On this page apart from the images I have not used rupee symbol due to font unavailability on all systems but program would work across all systems.  

You may and you may not use the font provided to display the rupee symbol. Since this is a unicode character you will be able to see it on all fonts with the available graph for the symbol.

This program is free to use and without source. You may wish to drop me a line of where it is being used.


  • No source for you to edit.


Version 1.6.0: First public posting.

Version 1.7.5: Few enhancements and fixes, decimal included.

Version 1.8.0: Few enhancements and fixes.

Version 2.0.0: Few enhancements and fixes. Included Marathi ("mr") as a langauge & added support for new rupee symbol. Thanks to Shri Javed Patel for Marathi translation.

Version 2.1.0: Many fixes and a few enhancements. A nearly new written code.

Version 2.5.0: Support for translation file. Now support for any language can be added by user by editing the translation file.

Version 3.0.0: Few enhancements and fixes. "Marathi" language is moved out to translation file.

Contents of Download

  • The solution built in VC# Express 2010
  • The usable files in your program:
    • Indian.dll
    • Settings.dll
    • langFor.xml

Planned Update

  • No Plans to update this program further until I get a really new idea haunts my mind.


This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


About the Author

Web Developer
India India
I am a computer engineer doing business at my city. I love to program is also engaged in part time programing. Normaly, work for fun and most of the time free of charge.

You may also be interested in...


Comments and Discussions

Questionconvert number to marathi words Pin
NIl Code26-Mar-13 0:26
memberNIl Code26-Mar-13 0:26 
AnswerRe: convert number to marathi words Pin
hprahul26-Mar-13 1:04
memberhprahul26-Mar-13 1:04 
GeneralRe: convert number to marathi words Pin
NIl Code26-Mar-13 1:10
memberNIl Code26-Mar-13 1:10 
GeneralRe: convert number to marathi words Pin
NIl Code26-Mar-13 19:21
memberNIl Code26-Mar-13 19:21 
GeneralRe: convert number to marathi words Pin
hprahul27-Mar-13 15:04
memberhprahul27-Mar-13 15:04 
GeneralRe: convert number to marathi words Pin
Nielcode28-Mar-13 21:19
memberNielcode28-Mar-13 21:19 
GeneralRe: convert number to marathi words Pin
hprahul29-Mar-13 14:57
memberhprahul29-Mar-13 14:57 
GeneralRe: convert number to marathi words Pin
Nielcode29-Mar-13 20:44
memberNielcode29-Mar-13 20:44 
QuestionGood lib for indian business applications Pin
SakarSR1-Sep-12 17:18
memberSakarSR1-Sep-12 17:18 
AnswerRe: Good lib for indian business applications Pin
hprahul1-Sep-12 23:38
memberhprahul1-Sep-12 23:38 
GeneralMy vote of 1 Pin
Dave Kreskowiak30-Aug-12 1:35
mvpDave Kreskowiak30-Aug-12 1:35 
GeneralRe: My vote of 1 Pin
hprahul30-Aug-12 5:17
memberhprahul30-Aug-12 5:17 
GeneralNot an article. Pin
Sharjith30-Aug-12 1:29
memberSharjith30-Aug-12 1:29 
GeneralRe: Not an article. Pin
hprahul30-Aug-12 5:16
memberhprahul30-Aug-12 5:16 
QuestionThx buddy, nice code Pin
danny33330-Aug-12 0:28
memberdanny33330-Aug-12 0:28 
AnswerRe: Thx buddy, nice code Pin
hprahul30-Aug-12 5:16
memberhprahul30-Aug-12 5:16 
QuestionThanks Pin
albarhami30-Aug-12 0:23
memberalbarhami30-Aug-12 0:23 
AnswerRe: Thanks Pin
hprahul30-Aug-12 5:14
memberhprahul30-Aug-12 5:14 
GeneralMy vote of 5 Pin
Christian Amado29-Aug-12 10:54
memberChristian Amado29-Aug-12 10:54 
GeneralRe: My vote of 5 Pin
hprahul29-Aug-12 14:57
memberhprahul29-Aug-12 14:57 
GeneralReally?? Pin
Dave Kreskowiak30-Aug-12 1:33
mvpDave Kreskowiak30-Aug-12 1:33 
GeneralRe: Really?? Pin
Christian Amado30-Aug-12 2:04
memberChristian Amado30-Aug-12 2:04 
GeneralRe: Really?? Pin
hprahul30-Aug-12 5:13
memberhprahul30-Aug-12 5:13 
GeneralRe: Really?? Pin
hprahul30-Aug-12 5:13
memberhprahul30-Aug-12 5:13 
Questionnice dll Pin
naweez12-Jul-12 21:51
membernaweez12-Jul-12 21:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180318.3 | Last Updated 30 Aug 2012
Article Copyright 2007 by hprahul
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid