This sqlite3 SQL may be helpful.  Note I add a column which is the human 
readable timestamp of the record

   SELECT dateTime, rain, datetime(dateTime, 'unixepoch', 'localtime') as 
dateString from archive WHERE dateTime > strftime('%s', 'now') - (24 * 
3600) ;

FYI, Rich

On Wednesday, May 9, 2018 at 12:09:59 AM UTC-7, Chris Schram wrote:
>
> Background: I am a weather spotter on the Oregon coast. When there is 
> excessive rain or wind, I am supposed to report it to the regional NWS 
> office.
>
> I recently attached my Vantage Vue to a spare Raspberry Pi 2B (after my 
> old iMac died), and after some initial headaches, got weewx working the way 
> I want it to. Except for one thing…
>
> I need a script that I can run as an hourly cron job, that can grab the 
> last few days of wind and rain data from weewx.sdb, and export it to CSV 
> (or some other format a spreadsheet can process).
>
> I have stared at much of the  sqlite3 documentation until my eyes glazed 
> over, but what should seem to be a simple solution is way beyond what my 
> simple mind can comprehend.
>
> Can someone here help get me started? I have no experience whatsoever with 
> SQLite.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to