Convert string date to DateTime.
My string is in this format (yyyy.mm.dd.hh.mm.ss) 2022.01.11.00.00.55.
I want to convert it into a "DateTime" SQL column.
I tried to find help on Internet but can't find an answer or a way to present my question.
The DateTime value should look like this (yyyy-mm-dd hh:mm:ss) 2022-01-11 00:00:55.
How do I do this in C#?
Open in new window
dt is a DATETIME not a string anymore11-Jan.-2022 12:00:55 AM
Open in new window
11-Jan.-2022 12:00:55 AM
2022-01-11 00:00:55