I have a requirement from a customer to create a binary data file, with the first 5 Bytes (or 40 bits) representing the microseconds of the day. Since there are 86400 seconds per day, the max microseconds of the day is 86400000000 and the customer wants this number represented in 5 bytes. How can I store this number into a 5 byte integer? Longs only go up to 4 bytes, or 32 bits. I could create an array of 5 unsigned chars, but how to store the number?
The number is read as a double, and would look something like 742039.302502 and I would somehow get it into a 5 byte integer representation of 742039302502
Any ideas?
thanks,
NewPappa