I have this code to retrieve the Localized Date: DateTime.Now.ToString(DateTimeFormatInfo.CurrentInfo.LongDatePattern);

The thing is that it returns the year also. I don't want the year.

So I thought I could remove the year pattern from the LongDatePattern. But there are commas in some countries and it would look bad if I removed the 2013 year.

Can someone help me to be able to do it?

有帮助吗?

解决方案

Windows.Globalization.DateTimeFormatting.DateTimeFormatter will allow you to supply a template that specifies exactly which components you want included in the formatted result ("month day dayofweek") for example.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top