Hi i am looking for method to transform English date in this format dd/MMM/yyyy
to Arabic date
for example 18/Feb/2016
will be in Arabic ١٨/فبراير/٢٠١٦
Short dates are written in "Day/month/year" from; when writing in Arabic and English: For Gregorian calendar: ١٦/١٢/٢٠١٣ميلادي or 16/12/2013.
string strDate = DateTime. Now. ToString("MM/dd/yyyy");
Try using something like this:
DateTime.Now.ToString("dd dddd , MMMM, yyyy", new CultureInfo("ar-AE"));
instead of the DateTime.Now
just put whatever DateTime
object you want to convert.
Use CultureInfo
class to convert date formats in different languages.
using System.Globalization;
DateTime.UtcNow.ToString("dd dddd , MMMM, yyyy", new CultureInfo("ar-AE"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With