How can I store a 13 digits int in Arduino?

For example, current timestamp is: 1500666822235

An uint32_t can only hold 10 digits max.

64 bits integer does not seem to be supported on RFduino.

  • Where they come from? As strings, sequence of bytes ...?
    – user31481
    Jul 21 '17 at 20:00
  • They're timestamps of sensor logging application (accel, gyro). It comes from combining millis (uptime) and RTC (absolute time). Jul 22 '17 at 2:13

That 20 digits. It is the maximum value of a uint64_t. Even the Arduino Uno can use the uint64_t. Perhaps the Serial.print does not support it, but the compiler supports it.

Which processor does your RFduino have ?

Where does the timestamp come from ? Perhaps you are asking the wrong question. Perhaps this is a xy-problem.


How can I store a 13 digits int in Arduino?

create a multi-byte type.

a 40-bit (32+8 bits), or a 96-bit (32+32+32) would hold a ton.

or BCD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.