I have to parse a field, that have 2 bytes, and saves a datetime information. To get the datatime, this field has this structure:
5 bits for day , 4 bits for month , and 7 bits for year (total 16 bits)
To get the day I am using :
byte day = (byte)(array[0] >> 3); (that's ok )
I could get the year too, but I can't get the month value, could you help me with this?
The array value is : {243,29} and I have to get this datetime: 30/6/2019
Thanks!