Glad it's working for you David. Just one little detail: in WeeWX, a timestamp represents the *end* of an archive period. So, your local time day would run from 2020-11-20 00:05 through 2020-11-21 00:00.
The easiest way to do this is something like select datetime(dateTime,'unixepoch','localtime'), outTemp, ..., where date(dateTime-300,'unixepoch','localtime')=='2020-11-21'; -tk On Fri, Nov 27, 2020 at 5:56 PM David Bach <[email protected]> wrote: > This forum and the helpful experts supporting it are a welcome reminder of > this thanksgiving season. Thanks to Tom, Vince and Karen for the help! > > Here is my solution to exporting some values from archive records, in case > someone might be interested: > > sudo /usr/bin/sqlite3 /Users/shared/weewx/archive/weewx.sdb ".mode csv" >> ".output /Users/user/Desktop/20201120.csv" "select datetime(dateTime, >> 'unixepoch', 'localtime'), outTemp, outHumidity, windGust, radiation, rain, >> ET from archive where dateTime >= strftime('%s','2020-11-20 08:00:00') and >> dateTime < strftime('%s','2020-11-21 08:00:00')" >> > > I wrote the output to a Mac OS desktop, thus the sudo command. > My challenge was exporting the timestamp in MM-YY-DD HH:MM format. The > unixepoch and localtime modifiers of the datetime function did that. > To get only the values for a single day I chose times 8 hours after the > ones I wanted (I'm in Washington State). > > The output began with values for local time 2020-11-20 00:00 and ended on > 2020-11-20 23:55. > > Thanks, again! > > On Thu, Nov 26, 2020 at 1:29 PM David Bach <[email protected]> wrote: > >> Thank you all, very much! This gave me the boost that I needed. >> >> On Tue, Nov 10, 2020 at 10:44 AM vince <[email protected]> wrote: >> >>> On Tuesday, November 10, 2020 at 7:13:00 AM UTC-8, John Kline wrote: >>> >>>> /usr/bin/sqlite3 /home/weewx/archive/weewx.sdb ".mode csv" ".output >>>> yesterday.csv" "select dateTime, outTemp, outHumidity from archive where >>>> dateTime > strftime('%s','2020-11-09 00:00:00') and dateTime <= >>>> strftime('%s','2020-11-10 00:00:00')" >>>> >>>> >>> ooh - multiple commands to sqlite3 just need to be delimited by double >>> quotes. That is 'really' good to know. Thanks !!! >>> >>> -- >>> 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/ee8fee8d-f00c-4efc-af8e-4967a128208eo%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/ee8fee8d-f00c-4efc-af8e-4967a128208eo%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Hill House Home >> Snoqualmie, Washington >> > > > -- > Hill House Home > Snoqualmie, Washington > > -- > 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/CAG_7EhZctWnJOngRFAYKhMGcDrXwfkFCbo6L8ZxrfA3DND5WfQ%40mail.gmail.com > <https://groups.google.com/d/msgid/weewx-user/CAG_7EhZctWnJOngRFAYKhMGcDrXwfkFCbo6L8ZxrfA3DND5WfQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zEBiqv8YzLtB6_RCjNK8rsVf0nJUKSDVWg2Q2Q-8KOtiew%40mail.gmail.com.
