I am trying to delete data between two time points as it is erroneous (I 
updated and for a short period the station type was reset to simulate).

The time points are 11/1/20 at 10:39:00 and 11:16:00 (so I think I have the 
right unixepoch timestamps)

I have worked out how to delete data that is older or newer than any one 
point but not between. In theory the following should work 

*sqlite3 /var/lib/weewx/weewx.sdb*

*delete from archive where datetime(dateTime,'unixepoch','localtime') 
BETWEEN '1578739140' AND '1578741360';*
*.exit*


but it doesnt and just appears to delete all data up to the last time 
stamp. All historic data seems to have been deleted (including all the NOAA 
data).

I have also tried 

*sqlite3 /var/lib/weewx/weewx.sdb*
*delete from archive where 
(datetime(dateTime,'unixepoch','localtime')>1578739140) AND *
*(datetime(dateTime,'unixepoch','localtime')<**1578741360);*
*.exit*


Strangely the database size seems to be the same though - so is it just a 
case of me panicking that I am loosing data and I need to wait for tables 
to be rebuilt?

TIA
Neil

-- 
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/0f6dc72d-4366-4e63-922a-bde2275822b7%40googlegroups.com.

Reply via email to