When I read a date I get a hexadecimal string for example "07E40205030B391200000002" I would like to know how to convert this string into a date in C# and python
the solutions proposed for this same problem do not work for me
There is an error on the clock status (The last byte in your hex string). The value is 2 and it's not used (reserved) in DMLS standard. Convert works, but that status state is lost.
Hi,
Hi,
You can use GXDLMSClient.ChangeType to convert byte array to date-time.
Something like:
GXDateTime dt = (GXDateTime) GXDLMSClient.ChangeType(YOUR_BYTE_ARRAY_VALUE, DataType.DateTime);
There is an error on the clock status (The last byte in your hex string). The value is 2 and it's not used (reserved) in DMLS standard. Convert works, but that status state is lost.
BR,
Mikko