Convert string to datetime, help

hey everyone,

i want to convert this string “30.09.2023 17:50:34” to a datetime variable.

(day: 30, month: 09, year: 2023, hours: 17, minutes: 50, seconds: 34)

how can i do that?

cheers

DateTime.ParseExact(“30.09.2023 17:50:34”,“dd.MM.yyyy HH:mm:ss”, System.Globalization.CultureInformation.InvariantCulture)

Probably some spelling mistakes in the code, but you will figure it out.

1 Like

DateTime.ParseExact(“30.09.2023,17:50:34”,“dd.MM.yyyy,HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture)

thanks a lot for quick reply <3

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.