StringToDateTime will return a TDateTime value, built from the DateTimeStr value.

As it is also considered to be a Conversion Function, please refer to StringToDateTime for details.

And for formatting, please review Date And Time Format Specifiers.