user3212730
user3212730

Reputation: 373

Displaying formated Date using Razor/.NET

I'm trying to display to the user of my ASP.NET MVC 4 (Razor, C#) web application, a date with this format Friday, January, 2014 in frensh language which becomes Vendredi, Janvier, 2014.

I've tried this

@DateTime.Today.DayOfWeek, @DateTime.Today.Month, @DateTime.Today.Year

But, using this, I've got : Friday, 1, 2014. I've searched in the Net, but, I haven't found much.

Thanks a lot !

Upvotes: 0

Views: 92

Answers (1)

Selman Genç
Selman Genç

Reputation: 101680

You need a custom DateTime format:

@DateTime.Today.ToString("dddd, MMMM, yyyy")

Upvotes: 2

Related Questions