试图将我的日期转换为以下格式:
2013 年 7 月 30 日
请帮忙。试图在谷歌上找到答案,但找不到与我需要的完全匹配的答案。我相信这对你的专业人士来说很容易。
使用String.Format
:
String.Format("{0:MMMM dd, yyyy}", #07/30/2013#)
或DateTime.ToString
:
Dim d = #07/30/2013#
d.ToString("MMMM dd, yyyy")
有关选项的完整列表,请查看自定义日期和时间格式字符串。
DateTime thisDate1 = new DateTime(2013, 7, 30);
Console.WriteLine("Today is " + thisDate1.ToString("MMMM dd, yyyy") + ".");
谢谢,贾乔特
yourdate.ToString("MMMM dd, yyyy")