Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

DatetimePicker Problem C#

Avatar of ANINDYA
ANINDYAFlag for India asked on
.NET ProgrammingC#Editors IDEs
23 Comments1 Solution1314 ViewsLast Modified:
I have qestion that is when I am selecting any date from the datetimepicker as in this form (return date) then it is taking the date and also the time. (Please see the image attached)
I am doing in this manner
DateTime DateofReturn;
                DateofReturn = dateTimePicker_ReturningDate.Value;
And the query I am using for Save option is

string query = "insert into Table_Borrow(MemberID,Film_ID,NameofItem,DateofReturn,Status) values(@parameter1,@parameter2,@parameter3,@parameter4,'" + b.ToString() + "')";

May I know what I have to do so that only the date as selected from the datetimepicker should get saved not time (that is 7A.M. should not get saved)

Thanking you,
Avatar of Om Prakash
This problem has been solved!
Unlock 1 Answer and 23 Comments.
See Answers