How to format time in influxdb select query

前端 未结 4 2041
旧时难觅i
旧时难觅i 2020-12-24 00:42

I am new to InfluxDB. I am querying data in admin ui. I see time as timestamp. Is it possible to see it formatted as date and time?

4条回答
  •  轮回少年
    2020-12-24 01:08

    The Web Admin Interface was deprecated as of InfluxDB 1.1 (disabled by default).

    The precision of the timestamp can be controlled to return hours (h), minutes (m), seconds (s), milliseconds (ms), microseconds (u) or nanoseconds (ns). A special precision option is RFC3339 which returns the timestamp in RFC3339 format with nanosecond precision. The mechanism for specifying the desired time precision is different for the CLI and HTTP API.

    To set the precision in CLI, you write precision in the command line depending on what precision you want. The default value of the precision for the CLI is nanoseconds.

    To set the precision in HTTP API, you pass epoch= as a query parameter. The default value of the precision is RFC3339.

提交回复
热议问题