Goran Bibic

Goran Bibic

  • 482
  • 2.9k
  • 197.8k

Datetimepicker format insert into sql problem

May 9 2018 3:06 AM
Datum sql format is date
Vrijeme poziva is sql format time(7)
  1. "INSERT INTO dbo.registar (datum, vrijeme_poziva)" +  
  2. " VALUES ('" + datumDateTimePicker.Value.Date.ToString("yyyyMMdd") + "', '" + vrijeme_pozivaDateTimePicker.Value.TimeOfDay.ToString("HHmmss") + "')"
 Working fine but in datagrid have values 
09.05.2018 00:00:00
09:51:32.25655565
 
In sql value is 2018-05-09
09:51:32.25655565
 
I need 
 
09.05.2018
09:51:32
 
Some help?
 
 
 

Answers (2)