0

Coding page

cmd.Parameters.Add("@StartTime", Convert.ToDateTime(tp_StartTime.SelectedTime).ToString("HH:mm"));

  • 2
    What is the datatype of the column on the database table that you are trying to update with your value? – Steve Jul 02 '19 at 06:22
  • i use datetime datatype – Pradeepa Logu Jul 02 '19 at 06:25
  • Hi @PradeepaLogu what datatype is startDate? Does changing startDate from datetime to date in your sql server help? –  Jul 02 '19 at 06:30
  • startDate datatype is datetime sir. my sql server version is 2005. i have only one option date time. how can i store time only in database without date – Pradeepa Logu Jul 02 '19 at 06:33
  • Check this to store time in sql server https://stackoverflow.com/questions/538739/best-way-to-store-time-hhmm-in-a-database – Mangesh Auti Jul 02 '19 at 06:53
  • Why is your SQL version so out of date? It went out of support many years ago. You should plan to upgrade a.s.a.p. newer versions also have a specific `time` data type which would be useful for this. – ADyson Jul 02 '19 at 07:13

0 Answers0