How to convert nanosecond timestamps to millisecond timestamps

Hi folks,

I am trying to query an influxdb that has their timestamps in a nanosecond epoch format. When I set up the query on Grafana I get no data. Using Chronograf I was able to determine that the default query returns timestamps of 12-31-1969.

I’m guessing I need to change the default query in some way so that views the times properly but I haven’t been able to find out how to do that. Specifically I want to change the epoch value in this query…

Object

request:Object

method:"GET"

url:"api/datasources/proxy/1/query"

params:Object

db:"systems_telegraf"

q:"SELECT "last_established" FROM "bgp_neighbor_state_updated" WHERE time >= now() - 6h GROUP BY time(15s), "neighbor_address""

epoch:"ms"

data:null

precision:"ms"

response:Object

results:Array[1]

0:Object

Can someone help me fix this?

Just to be clear this is the data inside of influx…


1606323597361262083 159988450903
1606323597373387294 160593598503
1606323597388440522 159988504203
1606323597401956235 159988449203
1606323597415693715 159988451203
1606323597427483246 160593667403
1606323597440341891 159988451903
1606323597455298566 159988450803
1606323597467680456 159988451103

Neither Grafana or Chronograf like those time stamps by default.