# Data storage and defined time checking

**URL:** https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561
**Category:** General
**Created:** [29 March 2019 07:08 UTC](https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561 "2019-03-29T07:08:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JokinSegu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JokinSegu](https://discourse.nodered.org/u/JokinSegu)
#### Post date: [29 March 2019 07:08 UTC](https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561/1 "2019-03-29T07:08:04Z")

</div>

Can I storage in Node-Red the values that I have been receiving and then, when I want see them depending the hour that I want to check?

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [29 March 2019 07:29 UTC](https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561/2 "2019-03-29T07:29:36Z")

</div>

There are many different database nodes available for Node-RED that you could use in a flow.You could then store the values in a database to achieve your requirements

---

<div class="post-metadata">

### Author: ![JokinSegu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JokinSegu](https://discourse.nodered.org/u/JokinSegu)
#### Post date: [29 March 2019 08:31 UTC](https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561/3 "2019-03-29T08:31:17Z")

</div>

And if I want to see which value was taking 2 hours can I see it clearly?

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [29 March 2019 08:36 UTC](https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561/4 "2019-03-29T08:36:06Z")

</div>

What you store in a database is entirely up to you, but if you stored the time then yes, you could send a query to the database to get back the data you wished.

The benefit of using a database is you can also access that outside of Node-RED as well.

There are lots of tutorials online that will explain how to get this working with Node-RED such as this one [https://diyprojects.io/node-red-tutorial-saving-mysensors-measurements-on-influxdb/#.XJ3Yuy-ca\_g](https://diyprojects.io/node-red-tutorial-saving-mysensors-measurements-on-influxdb/#.XJ3Yuy-ca_g)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [29 March 2019 09:58 UTC](https://discourse.nodered.org/t/data-storage-and-defined-time-checking/9561/5 "2019-03-29T09:58:54Z")

</div>

> [@JokinSegu](#):
>
> And if I want to see which value was taking 2 hours can I see it clearly?

If you want to work with time series data - e.g. tell me average power consumption per hour over the last 7 days - InfluxDB is an excellent choice and widely used by members of this community.

If you don't need that level of complexity for your time based queries, a SQL database would be fine.
