需要的日期格式(VB)

时间:2013-07-30 11:02:46

标签: asp.net vb.net

尝试将我的日期改为以下格式:

2013年7月30日

请帮忙。 试图在谷歌上找到答案,找不到我需要的完全匹配。我相信这对你的专业人士来说很容易。

3 个答案:

答案 0 :(得分:2)

使用String.Format

String.Format("{0:MMMM dd, yyyy}", #07/30/2013#)

DateTime.ToString

Dim d = #07/30/2013#
d.ToString("MMMM dd, yyyy")

有关选项的完整列表,请查看Custom Date and Time Format Strings

答案 1 :(得分:1)

DateTime thisDate1 = new DateTime(2013, 7, 30);
Console.WriteLine("Today is " + thisDate1.ToString("MMMM dd, yyyy") + ".");

谢谢, Jagjot

答案 2 :(得分:1)

yourdate.ToString("MMMM dd, yyyy")

相关问题