Many thanks for the pointers:





*sqlite> select dateTime, date(dateTime,'unixepoch','localtime'), sum(rain) 
from archive where 
date(dateTime,'unixepoch','localtime')=='2023-09-16';1694811600|2023-09-16|59.2sqlite>
 
select dateTime, date(dateTime,'unixepoch','localtime') as dt, sum from 
archive_day_rain where dt=='2023-09-16';1694811600|2023-09-16|59.2sqlite> *



On Tuesday, January 9, 2024 at 1:30:00 AM UTC+2 Tom Keffer wrote:

Unfortunately, the daily summary total is for 2023-09-17. We need 
2023-09-16.

Rather than mess with unix epoch times, here is a simpler way to do it:

*select **dateTime, date(dateTime,'unixepoch','localtime'), **sum(rain) 
from archive where date(dateTime,'unixepoch','localtime')=='2023-09-16';*
*select dateTime, date(dateTime,'unixepoch','localtime') as dt, sum from 
archive_day_rain where dt=='2023-09-16';*

The first query is not totally accurate because the record stamped 
2023-09-16 00:00 is included, although it is actually part of the previous 
day. But, your totals are so far off, it should be good enough.


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/17e0dd15-81b8-48ab-b8b5-bddfed290d7en%40googlegroups.com.

Reply via email to