i have this code , to download datas from a valve in command window
Example:
influx -database fielddata -host xyxy.com -port xyxy -execute “select * from zones WHERE (valve = ‘101’) AND time > ‘2018-03-23’ and time < ‘2018-04-23T23:59:59Z’” -format csv > test.csv
the problem is that get timestamps like that: time:1521763242000000000
i have no clue how i can convert it…i need help:-(
i would like to have this format: 2015-07-17T20:32:58
i have read something about " precision rfc3339" but i have no clue where i have to put in the code above.
Thank you for your help.
Hey Katy thank you, it works!
Hey influx --precision rfc3339 -database fielddata -host xyxy.com -port xyxy -execute “select * from zones WHERE (valve = ‘101’) AND time > ‘2018-03-23’ and time < ‘2018-04-23T23:59:59Z’” -format csv > test.csv
i have another question:
what kind of meaning has the letter Z for the time (2018-04-23T23:59:59Z)?
You’re using RFC 3339 format. RFCs document various technologies used to make the internet work, and can be found through a quick web search.
In this case, here is the relevant definition from the RFC:
Z A suffix which, when applied to a time, denotes a UTC
offset of 00:00; often spoken "Zulu" from the ICAO
phonetic alphabet representation of the letter "Z".