Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi!
I've created a simple RSS feed using razor. However I'm having some trouble with the culture for my date.
<pubDate>@item.CreateDate.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz")</pubDate>
This gets me the correct RSS date format but "ddd" is in my local culture (swe). Is there a way to force it to be in english so I can get it to validate?
Thanks / Niklas
You'll have to change the current culture as well (as per this MSDN post):
@{ Thread.CurrentThread.CurrentCulture = new CultureInfo( "en-US", false );}
Works perfect! Thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Eng date in rss feed
Hi!
I've created a simple RSS feed using razor. However I'm having some trouble with the culture for my date.
<pubDate>@item.CreateDate.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz")</pubDate>
This gets me the correct RSS date format but "ddd" is in my local culture (swe). Is there a way to force it to be in english so I can get it to validate?
Thanks / Niklas
You'll have to change the current culture as well (as per this MSDN post):
Works perfect! Thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.