# How to stop my Query from pulling the wrong Times

**URL:** <https://community.glideapps.com/t/how-to-stop-my-query-from-pulling-the-wrong-times/70000>\
**Category:** Ask for Help\
**Created:** [January 25, 2024, 8:13am UTC](https://community.glideapps.com/t/how-to-stop-my-query-from-pulling-the-wrong-times/70000 "2024-01-25T08:13:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 25, 2024, 8:13am UTC](https://community.glideapps.com/t/how-to-stop-my-query-from-pulling-the-wrong-times/70000/1 "2024-01-25T08:13:57Z")

</div>

To preface I only added in Time columns because I thought it might help along with Dates.

I am writing the last Date and Time a vehicle filled up to a full tank in the vehicles row in its own separate table, then looking up those values when relevant in Users. Similarly I am writing the Date and Time of every transaction that occurs. I want to query the transactions from the specific date AND time that is after the date AND time written in my vehicles table. The query is like so:

 ![Screenshot 2024-01-25 100719](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/2/0286c6d39f7eeb87086afe91f1f2235676b477a1.png)

The date and time is:  
 ![Screenshot 2024-01-25 100635](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/3/93708a522d814c24e868c1a7893cb47c8827bd16.png)

And yet its pulling transactions from 1pm…:  
 ![Screenshot 2024-01-25 100727](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/8/6812aad2ea4d9fa1db23aae4431d4874d1bf641c.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 25, 2024, 9:56am UTC](https://community.glideapps.com/t/how-to-stop-my-query-from-pulling-the-wrong-times/70000/2 "2024-01-25T09:56:00Z")

</div>

Couple of questions:

- which type of column are you storing the time in?
- how is the time value added to the table?
- is this data in a Big Table?

---

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 25, 2024, 10:01am UTC](https://community.glideapps.com/t/how-to-stop-my-query-from-pulling-the-wrong-times/70000/3 "2024-01-25T10:01:20Z")

</div>

A date/time column

Written as current date/time when transaction is closed

And it is pulling from bigtables

I got it to work, it seems as though the time filter had to just be after not on or after. My guess is that the date column was pulling all transactions for that date and after, so asking time to do the same thing was redundant? Not sure.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 25, 2024, 10:24am UTC](https://community.glideapps.com/t/how-to-stop-my-query-from-pulling-the-wrong-times/70000/4 "2024-01-25T10:24:46Z")

</div>

> [@MattGlides](#):
>
> I got it to work, it seems as though the time filter had to just be after not on or after

yup, that was my gut feeling, just wanted to be sure you weren’t doing something weird like storing the time as a number or a string.

> [@MattGlides](#):
>
> My guess is that the date column was pulling all transactions for that date and after

Yep.  
“on or after/on or before” will ignore the time, and just consider the date, whereas “before/after” also takes the time into account.

One other thing to be cognisant of is when you add a date/time column and configure it to display time only, that setting is purely for display purposes. The full date and time is still stored as the underlying value. So in this case, you were storing the exact same value in both columns, making your Time column redundant.
