Hello @Pete0815,
I’m sorry I’m having trouble understanding what exactly it is that you want to do?
If you want to query the last month of data all you have to do is:
from(bucket: "my-bucket")
|> range(start: -1mo)
If this isn’t what you want, here is a complete list of Flux functions for manipulating timestamps and time with influxdb:
- hourSelection(): select data between specific parts of the day.
- duration(): convert a timestamp to a duration in terms of seconds, minutes, hours, etc.
- events.Duration(): calculate the duration between events.
- now(): return the current time.
- system.time(): return the current time of the system.
- time(): convert a Unix nanosecond timestamp to an RFC3339 timestamp.
- uint(): convert RFC3339 timestamp to a Unix nanosecond timestamp
- truncateTimeColumn(): round or truncate an entire column to a specific timestamp unit.
- date.truncate(): round or truncate data down to a specific timestamp unit.
- experimental.addDuration()*: add timestamps to each other.
- experimental.subDuration()*: subtract timestamps from each other.
- experimental.alignTime()*: compare data across a window, i.e week over week or month over month.
As for tools to query influxDB. I highly recommend using the InfluxDB UI and the Query Builder.
Can you explain a little more what you’re looking to do?
Thank you