Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Can someone help me? I have a byte[2] with values:
byte[0] = 113 byte[1] = 66
How do I get a the date through the DOS date format from this 2 bytes?
正如@HansPassant 所说...
byte[] bytes = new byte[] { 113, 66 }; var day = (bytes[0] >> 3); var month = ((bytes[0] & 0x7) << 1) | (bytes[1] >> 7); var year = (bytes[1] >> 1) + 1980;
会给你 2013/02/14