1
Answer

convert string to datetime + insert into with condition

Ask a question
mali

mali

16y
10.3k
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