Splunk Search

Why do I get a different result from tstats when using the time range picker vs using where _time > value?

twinspop
Influencer

Using the time selector in search I run this search for yesterday (-1d@d to @d; aka 2016-04-17 EDT):

| tstats count min(_time) as Min max(_time) as Max where index=main

2016-04-17 EDT is equivalent to 1460865600 - 1460952000 in "unix" time. If I use those values in the advanced fields of the time range picker, I get the same results (expected). But, if I add those to the tstats command using where, it returns a far smaller count, and the Max and Min values are also a few seconds off.

| tstats count min(_time) as Min max(_time) as Max where index=main and _time>= 1460865600 and _time<= 1460952000

It seems like I should get the same results. What am I missing?

Thanks!

0 Karma

breddupuis
Explorer

Can you try this

| tstats count min(_time) as Min max(_time) as Max where index=main AND _time>= 1460865600 AND _time<= 1460952000

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...