Reading CLock

2 posts / 0 new
Last post
poojash
Reading CLock

Hello,
I can receive clock from meter and time is in hex format. I want to convert it into dd:mm:yyyy hh:mm:ss this format. what is the formula?

Kurumi
Kurumi's picture

Hi,

You can use GXDLMSClient.ChangeType to convert byte array to date-time.
Something like this:

GXDLMSClient.ChangeType((byte[])value, DataType.DateTime, useUtc);

Set useUtc to true, if your meter is using UTC time (Indian and Italy meters are using this and to false if your meter is from Europe.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi