Ajax Calender Extender格式?在Asp.net?

时间:2012-02-14 18:09:10

标签: asp.net

在web应用程序中,[asp.net]我放置ajax clander扩展器并将日期格式更改为dd-MM-yyy,在数据库中插入日期时它给出的错误日期格式是不正确的。

    Date dt= ConvertTodate(txtdate.tex);

这是我的代码,你能帮助我。

1 个答案:

答案 0 :(得分:1)

试试这个

string[] datePart txtdate.text.split('-')

DateTime dt = new datetime(datepart[2],datepart[1],datapart[0]);