5
Answers

Converting TextBox.Text to DateTime for instert into SQL Table

Ask a question
Larry Hojer

Larry Hojer

17y
9.7k
1
Hi,

I've got a converting problem. I'am trying to convert a text value in a TextBox to DateTime format without the last time information like 2007-06-26 00:00:00. I just like to insert 2007-06-26 (Swedish time format).

I've tryed: string str = Convert.ToDateTime(tbStart.Text).ToShortDateString;
But got an error.

Thanks in advance,

Answers (5)
Next Recommended Forum