1
Answer

convert string to datetime + insert into with condition

Photo of mali

mali

16y
10.8k
1

Hello to all,

I have annoying probleam:

 I try to convert string date  to datetime sql. the fomat in string is dd/mm/yyyy and the datetime is dd/mm/yyyy 00:00:00. I try this:

The string date is a datetime variable converted to stringShortDate

DateTime ds = Convert.ToDateTime(date) but it give me an error. the question is how to convert the string to the same format as the datetime in sql

Thenks

 

Answers (1)

Next Recommended Forum