Problem Updating Time columns in SQL

wiadus

New member
Joined
Jun 24, 2005
Messages
2
Programming Experience
Beginner
I am having SQL table where two columns store Time these two columns are decleared as Datetime in the SQL database and I am having problem updating these two columns. Whenever I update the Table and the DataAdapter is fill the Time column return (01 Jan 01) instead of the time I entered. When I check from the database it shows 00:00:00 and I am realy confuse may be I did not code it well so I would be grateful if any of you could help me. This is the code I use to add a row to the dataset before I call the update. I am a beginer. Thanks for your help
Dim drShifts as DataRow
Dim Time1 as Date
Dim Time2 as Date
Time1 = txtStarTtime.Text
Time2 = txtendTime.Text
drShifts = dsShifts1.Shifts.NewShiftsRow
drShifts.StartTime = Format(Time1, "hh:mm:ss")
drShifts.EndTime = Format(Time2, "hh:mm:ss")
dsShifts1.Shifts.AddShiftsRow(drShifts)
 
Back
Top