Search for a value of X hours ago

61 views
Skip to first unread message

P C

unread,
May 5, 2021, 9:14:26 AM5/5/21
to weewx-user
Hello,
I would like to seek in the database a value of 6 hours ago.
I guess it's the next tag that he will use,

$current($timestamp=some_time, $max_delta=delta_t,$data_binding=binding_name).obstype[.optional_unit_conversion][.optional_rounding][.optional_formatting]

But it lacks examples so that I can understand it. (I'm not bilingual and sometimes I have difficulty for some things)

Thank you in advance !

Tom Keffer

unread,
May 5, 2021, 9:59:22 AM5/5/21
to weewx-user
<p>The temperature 6 hours ago was: $current(timestamp=$current.dateTime.raw - 1800).outTemp</p>

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ebe8ad0d-cc50-4f34-8d35-81188d6ff765n%40googlegroups.com.

P C

unread,
May 5, 2021, 10:02:15 AM5/5/21
to weewx-user
Merci Tom, c'est plus clair avec un exemple !

gjr80

unread,
May 5, 2021, 3:53:25 PM5/5/21
to weewx-user
- 1800 or - 21600 ? :)

Gary

Blaise Cacramp

unread,
May 6, 2021, 8:24:23 AM5/6/21
to weewx...@googlegroups.com

Oui, théoriquement 21600 secondes

https://weewx.com/docs/customizing.htm#Time_periods

« delta_t is the largest time difference (in seconds) between the time specified and a timestamp of a record in the database that will be returned. By default, it is zero, which means there must be an exact match with a specified time for a record to be retrieved.»

Le 05-05-21 à 21:53, gjr80 a écrit :
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/l83dMbJyOaQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/22280e7c-c707-49ab-b760-5391222f3300n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages