I never did quite grasp the concept of bits. I am trying to decode date and time stamps that are stored as follows:
So how can I work this out? This is all I have (actual sample values), which arguably is really nothing.
Date is specified in decimal 16-bit integer in the following formats:
Bit 15-9
Year: Specify a value based on 0 as a 1980.
Bit 8-5
Month: Specify a value from 1 to 12.
Bit 4-0
Day: Specify a value from 1 to 31.
Time is specified in decimal 16-bit integer in the following formats:
Bit 15-11
Hour
Bit 10-5
Minute
Bit 4-0
Second / 2
So how can I work this out? This is all I have (actual sample values), which arguably is really nothing.
B4X:
Dim iDateStamp as Int = 18026
Dim iTimeStamp as Int = 24577
??????????