Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datetime format

Status
Not open for further replies.

baran121

Programmer
Sep 8, 2005
337
TR
hi
i am using C# and sql 2005
i want to learn why this code doesnt work. please help me.


DateTime tarih1 =Convert.ToDateTime(dateTimePicker1.Value.ToString("dd.MM.yyyy"));
DateTime tarih2 = Convert.ToDateTime(dateTimePicker2.Value.ToString("dd.MM.yyyy"));

conn.Open();
try
{
string sorgu = "select mno,tarih,gnedeni,teshis,tedavi,doktor from tbmuayene where tarih between '"+ tarih1+ "' and '" +tarih2+ "' "

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top