SQL Time(7) data type to VB Datetimepicker Time format

  • Thread starter Thread starter commanderbond
  • Start date Start date
C

commanderbond

Guest
Hi

I have a datetimepicker object on my form and I have set the format to Time with up down arrows. I have a SQL table with a field which I have set as Time(0) datatype. I'm using a SqlDataReader to set the value of the objects on my form to the value from the selected SQL record. I'm struggling to convert the SQL Time(0) data type so that it shows in the Time formatted datetimepicker object as "hh:mm:ss". All my efforts are returning an error "Specified cast not valid". Any advice on how I should be reading this datatype to get it into my VB object in the format I want? Thanks

Continue reading...
 
Back
Top