Fahrenheit instead of celsius in weewx.sdb? / csv export: wrong datetime format

75 views
Skip to first unread message

Thomas Hackler

unread,
Mar 1, 2024, 8:13:29 AM3/1/24
to weewx-user
Hello,
I started playing with a copy of weewx.sdb to open it as a csv file to work with the data in Excel. I used the DB Browser for SQLite to export the data to csv, this worked.
If I look on the data in the DB browser and in Excel for my temperatures they look really strange. I expect Celsius and it seems to be Fahrenheit?
Now I see that in my weewx.conf under [StdConvert] target_unit = US, so I should change it now in "METRIC", right ?
I guess I have to convert my temps in Excel from Fahrenheit to Celsius for my old data....

The other values for humidity etc. show partially very high values like 4,7e+14.or 870 for example (maybe it is 87.0 in reall).

The other problem is that I am not able to convert the datetime into a right time format in Excel to see time and date ? Maybe you can help me here?
I tried different options like Unicode, Windows, US-ASCII etc. in Excel for the import with no success.
Thanks!
Regards
Thomas

Tom Keffer

unread,
Mar 1, 2024, 8:30:07 AM3/1/24
to weewx...@googlegroups.com
By default, the database uses US Customary Units. It can be changed, See the section Changing the unit system in an existing database in the Customizing Guide.

If your humidity (observation type 'outHumidity') has strange values, then your sensor must be emitting strange values. See the wiki article Cleaning up old 'bad' data. Be sure to set StdQC values to prevent it happening again in the future.

Times in WeeWX are in Unix Epoch Time, which must be converted into the native Excel date+time representation. Sorry, I don't know how to do this --- I almost never use Excel. All I can suggest is a Google search.



--
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/c82346f7-6dee-4f85-b156-ee1ac5e0632cn%40googlegroups.com.

Karen K

unread,
Mar 1, 2024, 11:23:09 AM3/1/24
to weewx-user
I would suggest to use the SQL statement 

select datetime(`dateTime`,'unixepoch','localtime'),* from archive;


to extract the data out of the database. Please note the different quotes. 


Reply all
Reply to author
Forward
0 new messages