If you want the results in metric, it would be best to convert the database
first, then dump it to CSV. For how to convert the database, see the
section *Changing the database unit system
<http://www.weewx.com/docs/customizing.htm#Changing_the_unit_system>* in
the Customizing Guide.

You didn't say what kind of database, but if you use sqlite, the utility
sqlite3 can export to CSV. You may need to download it first

*sudo apt install sqlite3*

Then

*sqlite3 weewx.sdb*
sqlite> *.headers on*
sqlite> *.mode csv*
sqlite> *.output weewx.csv*
sqlite> *select * from archive;*

This will create a file weewx.csv with the data. It will be in whatever
unit system your database is in. Hence, the need to convert first.

Documentation for sqlite3 <https://sqlite.org/cli.html>.



On Tue, Apr 21, 2020 at 12:24 PM Janne Prokkola <[email protected]>
wrote:

> hello
>
> I'd like to export my database to csv. Is there any easy way to export US
> format database to metrics units?
>
> I'm building my weather station set up. I'm thinking should I have the
> database in metrics format or should I stay in US. In Finland I have no use
> for imperial/US units.
>
> best regards
> Janne Prokkola
>
> --
> 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/ba6c819d-a9c5-406e-9854-60af09e81b9b%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/ba6c819d-a9c5-406e-9854-60af09e81b9b%40googlegroups.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/CAPq0zED8XLSLSgfw%2BjE83FD%3Dbs2KNuBuBp0NgHWJM4FHYeHKzA%40mail.gmail.com.

Reply via email to