-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.DateTimedocumentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test code
Milestone
Description
Description
System.Convert.ChangeType does not work converting System.String to System.DateOnly. I would expect it to work given that it does work for System.String to System.DateTime.
Reproduction Steps
Convert.ChangeType("1/1/2000", typeof(DateTime)); //Works
Convert.ChangeType("1/1/2000", typeof(DateOnly)); //InvalidCastException
Expected behavior
System.Convert.ChangeType should work for String -> DateOnly
Actual behavior
System.Convert.ChangeType does not work for String -> DateOnly
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
TomaszWegrzyn and fmflurry
Metadata
Metadata
Assignees
Labels
area-System.DateTimedocumentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test code