Converting String to DateTime

Hello!

is there a function to convert a string to DateTime?

In my code, I have created a String myWord = 26,06,2025;

How can I convert myWord to a DateTime?

I would appreciate any help.

This is a C# question and not really NT, but here’s how to do it.

If you have the year, month & day elements that created myWord, you can just use them to build your DateTime. Otherwise, you’ll need to parse the string and extract the elements.

DateTime myTime = new DateTime(year, month, day);

or

DateTime myTime = new DateTime(year, month, day, hour, minute, seconds);

Here’s more info: