如何格式化DateTime变量以获取Month,然后将值放入C#中的字符串?[VS2005]

2 c# format datetime visual-studio-2005

DateTime dt = Convert.ToDateTime(dateTimePicker1.Text); //taken the DateTime from form
string dt1 = String.Format("Y", dt); //trying to make so that it comes to "August 2009"
Run Code Online (Sandbox Code Playgroud)

尝试但我得到的是dt1 ="Y".

Gor*_*ell 5

DateTime dt = Convert.ToDateTime(dateTimePicker1.Text); //taken the DateTime from form
string dt1 = dt.ToString("MMMM yyyy")
Run Code Online (Sandbox Code Playgroud)