1"String is not recognized as a valid DateTime"

Hi, I am creating a dictionary and store people’s names and their birthdays but this error occur.


Check the format of dates stored in variables.


Can you share the sample date which you are trying to convert?

Check below

Hope this helps you

Follow Link


Hello Ahmad,
In this video I do a lot of stuff with DateTime:

20:05 DateTime to string in multiple ways
23:00 AddDays get DayofWeek
25:40 Convert from String to DateTime
26:20 Compare DateTime

Cristian Negulescu