DateTime dt = DateTime.Today; System.Globalization.CultureInfo cousins watch parts Cinfo2 = new System.Globalization.CultureInfo ("ar-SA", false); // Password cousins watch parts here string arabic_day = dt.ToString ("ddd", Cinfo2); string arabic_month = dt.ToString ("MMM", Cinfo2); string arabic_Date = dt.ToString ("dd / MM / yyyy", Cinfo2); string arabic_FullDate cousins watch parts = dt.ToString ("ddd yyyy / MM / dd", Cinfo2); string arabic_ShortDate = dt.ToString ("yyyy / MM / dd", Cinfo2);
Password in the second line, which simply use the culture of the state that depend history Islamic cousins watch parts which in our example Saudi Arabia, then when we do any operations on the date will be the date on Islamic, of course, when you change the culture cousins watch parts change the results accordingly, you will not notice it in the names of days, but it would be evident in the names of months back to pass quickly to the rest of the lines, line No. 3 brings us the name of today's Arabic-language note, we repeated the letter d three times and this means that we want to name either if we figure we repeat it twice only, no need to say that the character d symbolizes Day Day line No. 4 brings us the name of the month in the Arabic language, the same observation also for the letter M repeated cousins watch parts three times gives us the name and twice gives us a figure, but here I would like the alarm to note a very important cousins watch parts is that the letter M when he writes this way it indicates the month Lama when he writes as a small m is indicates Minutes fifth line gives us the formula Islamic history known sixth line adds just the name of the day for the rest of history the last line only in reverse order of presentation
Notes that the control is through the use of special cousins watch parts characters, meaningful work when Format of history, and therefore you can control the view as you want, by the way can also display the time using a simple special characters cousins watch parts represent hours, minutes and seconds ...
Of course possible that brother Mohammed and the example on the theme could work in any page, regardless of the culture-General of the page or to the program if you want to display the date Islamic names Arabic use the previous example as it is but if you want the change to the Gregorian and the names of English just change the line No. 2 and replace the code of Saudi Arabia into a symbol of any country depends Gregorian date of the names of English, for example, "en-US" But if you want to display the date AD Arab use the code names of any Arab state depends Gregorian date ... and so on ...
March 30, 2008
Thank you my dear brother last Sual Can I use the same method to convert the date of formate to formate last words, if the user enter the date in a manner Year \ Day \ month and I want to be in a way formic cousins watch parts year \ month \ Day I Did it? If yes please send an example cousins watch parts if possible and thank you in advance
Add a comment Cancel reply
You can use these HTML tags and attributes: <a href="" cousins watch parts title=""> <abbr title = ""> <acronym title = ""> <b> <blockquote cite = ""> cousins watch parts <cite> <code> <del datetime = ""> <em> <i> <q cite = ""> <strike> <strong>
Latest Articles How is the preparation of the first program of Android cousins watch parts step by step now programming Android has become easier and faster to solve the problem cousins watch parts of keeping pages before closing in Firefox 4 FireFox4 programming experience to write on your computer cousins watch parts to get parts Hijri date in the dot-Net Last comments Mohammed on how to prepare the first program of Android step step Moataz Almkzumi on how to prepare the first program of Android step by step Mohammed Alsaggaf on how to prepare the first program of Android step by step Said on how to prepare the first program of Android step by step happy to now programming Android has become easier and faster Misc login Summary Recent Entries RSS comments feed RSS WordPress.org
No comments:
Post a Comment