# Storing/retrieving data

**URL:** <https://forum.arduino.cc/t/storing-retrieving-data/531897>\
**Category:** General Guidance\
**Created:** [June 16, 2018, 9:52am UTC](https://forum.arduino.cc/t/storing-retrieving-data/531897 "2018-06-16T09:52:41Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [June 18, 2018, 12:01am UTC](https://forum.arduino.cc/t/storing-retrieving-data/531897/21 "2018-06-18T00:01:24Z")

</div>

> JMeller:  
> From what this n00bie has [read](https://www.arduino.cc/en/Reference/EEPROMWrite), EEPROM has a specified life of 100,000 write/erase cycles.

I don't think that is necessarily as bad as it might at first sound! There is some useful background at  
[http://forum.arduino.cc/index.php?topic=282974.0](http://forum.arduino.cc/index.php?topic=282974.0)  
I just bookmarked without closely reading, but the first line of the first post suggests the EEPROM is to be used for its proper purpose, and the advice is from gurus who really do have practical experience.

---

<div class="post-metadata">

**Author:** ![JMeller](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@JMeller](https://forum.arduino.cc/u/JMeller)\
**Post date:** [June 21, 2018, 1:05am UTC](https://forum.arduino.cc/t/storing-retrieving-data/531897/22 "2018-06-21T01:05:02Z")

</div>

Very useful info- thanks Nick.

---

<div class="post-metadata">

**Author:** ![wvmarle](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wvmarle/32/1013044_2.png) [@wvmarle](https://forum.arduino.cc/u/wvmarle)\
**Post date:** [June 21, 2018, 4:30am UTC](https://forum.arduino.cc/t/storing-retrieving-data/531897/23 "2018-06-21T04:30:18Z")

</div>

A few ways to reduce data:

Date: don't store day, month, year. Store it as "days since epoch" where you can choose your epoch. This allows you dates spanning 256 days in a single byte; 65536 days (almost 180 years) in an int of two bytes. The same two bytes allow for hourly resolution if you're OK with rolling over after 7.48 years.

Floats: if you need two decimals, multiply the number by 100 and store it in an int. That way you can store any value from 0.00 up to 655.35 into a single int of two bytes. That saves half the space.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 6:36pm UTC](https://forum.arduino.cc/t/storing-retrieving-data/531897/24 "2021-05-05T18:36:11Z")

</div>

Closed on May 5, 2021, 6:36pm UTC



[Previous page](https://forum.arduino.cc/t/storing-retrieving-data/531897.md?page=1)
