I have one date like 12/05/2012 now i would like to change that format in to simple string.
for ex.
string newdate = new string();
newdate = "12/05/2012";
DateTime Bdate = DateTime.ParseExact(Newdate, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
now my BDate is DateTime
ie. BDate= 2012/05/12
now i want to do something like
if my Bdate is 12/05/2012
so i want a string which is similar like “Twelve May two thousand twelve”
How can i do this?
Please help me…
Thanks in advance….
You’ll need to look at each date part and use a function to get the written equivalent. I’ve included a class below that converts integers to written text, and extended it to support
DateTimeconversion as well:Using this class, just call the DateToWritten method:
The output of the above is:
Twelve May Two Thousand Twelve