日期格式转换

using System.Globalization;

namespace Enterprise.Website
{
    public partial class Ok : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Request["result"] != null)
            //{
            //    Response.Write(Convert.ToString(Request["result"]));
            //}
            CultureInfo MyCultureInfo = new CultureInfo("de-DE");
            string MyString = "12 Juni 2008";
            DateTime MyDateTime = DateTime.Parse(MyString, MyCultureInfo);
            int a = MyDateTime.Month;

        }
    }
}

posted @ 2008-11-12 17:33  Jason.Bird  阅读(319)  评论(0编辑  收藏  举报