How to Convert string to DateTime with Custom Format in C#

preview_player
Показать описание
C# course:

API development using C#:

Taurius on SkillShare:

Support this channel and find great deals on patreon:

Рекомендации по теме
Комментарии
Автор

Thank you very much, this helped a lot, greets from mexico.

produccionesjym
Автор

Sorry i didn't get what the "null" at the end means. Can you please explain?

null_vs
Автор

How can I save the value of the DateTime into a database with the correct format? The German format is: "dd.MM.yyyy";
I already have it so far that I can enter my data into the database, but I get an error message with: string UserBirthday = txtUserBirthday.Text;

An error message.
"Conversion failed when converting date and/or time from character string."
The database has different values that it takes in.

It first takes a variable of type string, which comes from the txtUserBirthday control.
The data type in the database is for UserBirthday = DateTime2;

DJoneone