QuestionQ16

VerifiedData Manipulation

Which expression correctly converts the string variable “DateString,” with the value “03/03/2023 16:23:11,” to a Date Time variable?

Explanation

DateTime.ParseExact requires the input to conform to the specified custom format. dd/MM/yyyy matches the day/month/year date order, and HH:mm:ss matches a 24-hour time such as 16:23:11. Microsoft Learn: Custom date and time format strings

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!