Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting multiple dateFormats when using DateTimeConverter and NullableDateTimeConverter #96

Open
NascarSean opened this issue Apr 22, 2024 · 0 comments

Comments

@NascarSean
Copy link

I have been trying to implement a way to allow this but it's unable to be deserialized successfully.
Example code
protected override bool InternalConvert(string value, out DateTime result) { string[] formats = { "M/d/yyyy", "yyyyMMdd" }; return DateTime.TryParseExact(value, formats, CultureInfo.InvariantCulture, DateTimeStyles.None, out result); }

But I find this is unsupported in every attempt to implement due to the serialization of the ArrayConversion, and I was curious if there was a reason to limit the implementation initially?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant