Click here to Skip to main content
15,919,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a date which is displayed on 12 July 2013. I am using the format "dd MMMM yyyy". I want to display the month text i.e. July in Arabic text. Is there anyway?

Am getting يوليه as result instead يوليو, My client, saying : the month of July is “يوليو” in Arabic, while on the website it is showing as “يوليه”. Which is wrong,
can anyone help me on this?

Please find the code below.

What I have tried:

CultureInfo uiCulture1 = CultureInfo.CurrentUICulture; //'ar-AE'
DateTime dDateTime2 = DateTime.Parse(dt.ToString(), uiCulture1, System.Globalization.DateTimeStyles.AssumeLocal);
lblDate.Value = dt.ToString("dd MMMM yyyy");
Updated 3-Nov-22 2:16am

1 solution

use this
var date = DateTime.Now.ToString("dd/MMM/yyyy",new CultureInfo("ar"));
Share this answer
reshmy Prasad 12-Oct-17 9:20am    
All input giving proper output while am working in local machine but when I put the code files to the remote server the result is wrong.

Is it this issue cause by machine settings, my local machine is Windows 7 and the server is Windows 10
Richard Deeming 12-Oct-17 13:29pm    
You shouldn't be using Windows 10 as a server. It's a client OS, and as such, IIS is limited to 10 concurrent connections. If more than 10 people try to access your site, they will get "service unavailable" errors instead.

You need to use a proper server OS instead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900