# Google Sheets Pulling data between a specific date and time, from a timestamp

Web Applications Asked by Steven Lipton on January 5, 2022

I am trying to pull specific data from a timestamp that I will be using in several pivot tables.

To summarize:
I have several other workbooks that have a google form attached to them. When my employees fill out the form a timestamp appears in one of the workbooks. The data in those workbooks are being pulled by the link I shared. (i included some random data to play with)

Then I made a pivot table for each Hour of the workday (7am-6pm) to summarize all the information for a specific date and a specific range of time. If I have all the data it’s easy for me to filter the pivot table by date and time. See below (In this example I’m retrieving all the data by each processor who worked on 6/25/2019 at 8:00 am to 8:59 am):

This is perfect; however, it only works if I already have the data. When a new day begins and new data is being pulled the pivot table won’t pull anything because the filter for a new date and specific hour of the day has not been created. This is because the data doesn’t exist yet. Fair enough.

What I want to do is find a way to pull data from a specific future date and specific future time to see live data. For example:

7/01/2019 8:00am to 8:59am,
7/01/2019 9:00am to 9:59am,
7/01/2019 10:00am to 10:59am.


So let’s say tomorrow (7/01/2019), Max fills out the form at 8:33 am the formula will automatically pull that criteria because it falls between 7/01/2019 8:00 am to 8:59 am

I know I can put formulas into a pivot table or search between different numbers but I am having a really hard time figuring this out. Should I be using something else that’s not a pivot table?
I would need to SUM the “# OF LOADS” and the “# OF PVS” and the TOTAL by an employee, and by how much they’ve done an hour. Any help is appreciated. Thank you.

## One Answer

You have array mismatch in formula at A598 cell. It should be

=QUERY(IMPORTRANGE("1iYHYdATK06Wxl-Jtxe2P92Kh50XEsWgwx5d-5gib1io",
"FORM RESPONSE GO TO FORM--> LIVE FORM!A2:G50"),
"select Col1,Col2,Col3,Col4,Col5,' ',Col6 label ' '''", 0)

Also, delete the whole column H and paste this into DUMP!H1:

=ARRAYFORMULA({"TOTAL";""; IF(LEN(A3:A), C3:C+E3:E, )})

And then instead of buggy pivot tables you can use query for each hour:

=ARRAYFORMULA(QUERY({A3:H, HOUR(A3:A)},
"select Col7,sum(Col3),sum(Col5),sum(Col8)
where Col1 is not null
and Col9=8
group by Col7
label sum(Col3)'',sum(Col5)'',sum(Col8)''", 0))

...for timestamps with 9th hour:

=ARRAYFORMULA(QUERY({A3:H, HOUR(A3:A)},
"select Col7,sum(Col3),sum(Col5),sum(Col8)
where Col1 is not null
and Col9=9
group by Col7
label sum(Col3)'',sum(Col5)'',sum(Col8)''", 0))

...etc

Answered by user0 on January 5, 2022

## Related Questions

### Google Sheets Pulling data between a specific date and time, from a timestamp

1  Asked on January 5, 2022 by steven-lipton

### Can I pre-hash data uploaded to Facebook custom audiences?

2  Asked on January 5, 2022 by gillytech

### How can I automatically resend a Slack message every X days in a public channel if it hasn’t gotten any reply?

1  Asked on January 5, 2022

### Consolidating Google Slides

1  Asked on January 5, 2022 by user251141

### How to see all YouTube likes if you liked over 5,000 videos?

2  Asked on January 3, 2022 by aegis-reflector

### Google Sheets formula to find previous day high of a share price

4  Asked on January 3, 2022

### My G Suite Gmail personal emails to people are being sent to spam

1  Asked on January 1, 2022 by bshor

### Change link unfurling image used by Notion

1  Asked on January 1, 2022

### What system Google Photos use to determine the time zone for photos?

0  Asked on December 29, 2021 by fido

### Restructure (flatten) data of Google Sheets table in a new table

2  Asked on December 25, 2021

### What determines the Google bio frame upon search relevance/subjects?

1  Asked on December 23, 2021 by shelf-dancer

### postEdit functions getting range

1  Asked on December 23, 2021 by gavin-martin

### How to stop sunrise from auto populating events in Google Calendar

1  Asked on December 23, 2021 by hackerl33t

### Sheets – Lookup most recent entry based on unsorted date value

1  Asked on December 23, 2021 by tzonov

### Google Docs sporadically disconnects and reconnects while editing

1  Asked on December 20, 2021 by steve361

### How do you use the SPLIT function to separate unseparated characters in Google Sheets?

2  Asked on December 20, 2021 by phylocoder

### Can Google Calendar view six weeks, not starting at the beginning of a month?

5  Asked on December 18, 2021 by yodan-tauber

### How to send email from specific address when choosing specific contacts?

3  Asked on December 18, 2021 by eyal-levin

### Creating a custom formula in Google Sheets without scripting, but instead based upon another sheet

1  Asked on December 18, 2021

### Select multiple groups with mouse drag in draw.io

2  Asked on December 15, 2021 by akerus

### Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir