On Wednesday, October 17, 2018 at 8:40:55 AM UTC-4, Herwig Diessner wrote:
>
> Hello all,
>
> I need to export only 3 pieces of data from weewx into a file.
> The file should contain a single line of text in the following format:
> date;pressure;temperature
>
> The date is in the format "yyyy-MM-dd HH:mm:ss".
> The pressure and temperature are expressed in hPa and °C, respectively
>
> I tried to use the CSV extension and succeeded in
> - single line
> - time-format
>
> However, all sensor data is exported and the delimiter is fixed to , 
> instead of the required ;
>
> Is there any chance to succeed using the CSV extension (e.g. options to 
> define the delimiter as ; instead of , - and options which sensor data is 
> to be exported)?
> Or do I need another extension, or is there even another way?
>
> My searches on "export" and "csv" didn't bring any clues.
>
> In case of interest, this is my use case:
> I want to use temperature and pressure data to calculate "refraction" data 
> for astrophotography using a 10micron telescope mount.
> This mount allows to calculate refraction data automatically if fed with a 
> text file with the specifications above.
> Probably there are more users who might make use of this.
>
> Thank you for any hint,
>
> Herwig
>


The following mysql select statement gave me the results you wanted.  
2016-02-21 19:10:24;29.92;52.34
My database isn't metric but you can convert if necessary.  If you use 
sqllite i'm sure someone will convert for you.

select timestampadd(second, dateTime, '1970-01-01'),barometer,outTemp into 
outfile 'test.csv' fields terminated by ';' from archive limit 5;

-- 
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