Second last value from database

52 views
Skip to first unread message

Mikael Fredriksson

unread,
Aug 21, 2019, 12:01:33 PM8/21/19
to weewx-user
Hi.

Can't figure it out!

How can I get the second last, third last and so on from my weewx.sdb?

<td>$year.avg_distance.last</td>

This gives me the last value.

Thanks, Micael

Thomas Keffer

unread,
Aug 21, 2019, 8:06:17 PM8/21/19
to weewx-user
Unfortunately, there is no aggregation type of "next to last," etc. Only last.

You would have to write your own search list extension.

-tk

--
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/b377d917-4c78-48c7-9233-054200bf3e03%40googlegroups.com.

Mikael Fredriksson

unread,
Aug 22, 2019, 1:43:36 AM8/22/19
to weewx-user
Ok, then I'll skip this for now as I'm not able to write that on my own.
Thanks for your answer Thomas.
/Micael
Reply all
Reply to author
Forward
0 new messages