How do I do the math please? For example, I wanna find out date time 5 minutes before the above date. In MySQL datetime format is 2018-04-28 09:27:01 and the math function to get 5 minutes earlier is:
I knew how to that use influxdb’s time column and was just wonder if I can do the same for my own datetime column with format, e.g., “May 1 03:48:01” - looks likely this is not possible.
When you say your own datetime column, do you mean that you’re storing a date and time as a string in a field of an InfluxDB measurement?
That would be an unusual use case for a time-series, I’d be curious to hear more about what you’re working on. I’m having trouble coming up with a scenario where I’d need to store a timestamped timestamp.
If you are storing the time column from your HAProxy logs in a string in InfluxDB, then no, it is not possible to perform time operations on that data.
However, it doesn’t sound like you need two timestamps. Instead of having the database create a timestamp when it receives a point, you can pass it a time for each point that you send—in this case, you would parse the time from the HAProxy log entry and use that as the timestamp for the point.