Replies: 1 comment
|
It looks like this may not be supported OOTB, but may be possible with a custom converter / codec as seen in the source code unit tests: https://github.com/pythonnet/pythonnet/blob/master/src/embed_tests/Codecs.cs#L511 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment
Details
I am trying to read a Python
datetimetype as aDateTimein C#.I have created a minimal sample to reproduce this here:
As seen in the above example, calling
today.ToDateTime(CultureInfo.InvariantCulture)results in:This may be by-design as the implementation itself merely throws
InvalidCastException.However, calling
today.As<DateTime>()results in:All reactions