Dear all,
I want to translate PDU to XML like in browser translater by gurux to show event data. I am using GXDLMSTranslator.MessageToXml of the Gurux.DLMS.Net library. I'm able to parse all the contents on XML but i'm having trouble converting the <x:octet-string>07E60408FF0A1A30FF800000</x:octet-string> to the date and time of the event. I tried using the GXDLMSClient.ChangeType to datetime but it throws an "System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime".
The value should be in Standard dlms bluebook time format
I tested this like this and it worked without problems.
var dt = GXDLMSClient.ChangeType(GXCommon.HexToBytes("07E60408FF0A1A30FF800000"), DataType.DateTime);
Can you try to run it and share your operating system date and time settings if you have problems?
Hi,
Hi,
I tested this like this and it worked without problems.
var dt = GXDLMSClient.ChangeType(GXCommon.HexToBytes("07E60408FF0A1A30FF800000"), DataType.DateTime);
Can you try to run it and share your operating system date and time settings if you have problems?
BR,
Mikko
Amazing, it worked, Thank you
Amazing, it worked, Thank you!
Hi,
Hi,
Thanks for letting me know that it worked.
BR,
Mikko