bkelley
(Butch)
May 11, 2018, 6:14pm
1
Hello -
I have an epoch date (in ms) and I'm trying to create a JSON query that gives me all records between 1 hour before and 1 hour after my epoch date.
Below is my query which is not working. Is there a "right" way to do this?
Thanks,
Butch
{
"range": {
"@timestamp ": {
"gt": "1526002896000||-3600000",
"lt": "1526002896000||+3600000"
}
}
jbudz
(Jon Budzenski)
May 11, 2018, 7:51pm
2
Hey, I think that's pretty much it but you'll want to add units at the end:
"gt": "1526002896000||-1h",
"lt": "1526002896000||+1h"
Are you getting any errors?
bkelley
(Butch)
May 14, 2018, 12:56pm
3
Thanks Jon - that worked!
system
(system)
Closed
June 11, 2018, 12:56pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.