# powerMeter seconds into date

**URL:** <https://discourse.nodered.org/t/powermeter-seconds-into-date/38747>\
**Category:** General\
**Created:** [7 January 2021 19:35 UTC](https://discourse.nodered.org/t/powermeter-seconds-into-date/38747 "2021-01-07T19:35:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [7 January 2021 19:35 UTC](https://discourse.nodered.org/t/powermeter-seconds-into-date/38747/1 "2021-01-07T19:35:43Z")

</div>

hello  
i have a powerMeter  
it counts up with the used power and a second value is a number which are seconds.  
in Grafana i show this PowerInformation and also calculate the Price used since the Counter started! This works so far.  
Now i wish to change the Second to get a output like  
Date (now) - Seconds and got the Date/Time the counter started.  
and  
change the Seconds into  
weeks days hours Minute and seconds  
both Information into InfluxDB to take it out with Grafana.

Or you tell me it is more easy to save the second into influx and do the math when adding into Grafana!

have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 January 2021 10:36 UTC](https://discourse.nodered.org/t/powermeter-seconds-into-date/38747/2 "2021-01-08T10:36:17Z")

</div>

Googling suggests there are ways of telling grafana that a value is in seconds and to get it to convert to human reading elapsed time, but I think you would have to do some research and see if it works for you. The alternative would be to convert it to a string in node red and put that in influx. Saving the string in influx will add a lot to the size of the influx database, but whether that is an issue probably depends on how often you are storing the data, every second or once an hour for example.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 March 2021 10:36 UTC](https://discourse.nodered.org/t/powermeter-seconds-into-date/38747/3 "2021-03-09T10:36:29Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
