Determine if date is between two other dates

Hi!

I am trying to create a security filter for data restriction. I am trying to restrict access to results. Each result has a device name and a time attached to it. I have a separate sheet with device names, start dates, and an end dates. I need to create a filter that only shows results if the time attached to the record is between the start date and the end date in this separate sheet. Any advice?

Thanks!

0 4 98
4 REPLIES 4

You can try

AND(
 [Device] = CONTEXT("device"),
 LOOKUP(CONTEXT("device"), "filter table", "device", "start date") <= DATE([record time]),
 DATE([record time]) <= LOOKUP(CONTEXT("device"), "filter table", "device", "end date")
)

Thanks @TeeSee1! In your example, what should the "device" in 

 

 CONTEXT("device")

 

be? 

https://support.google.com/appsheet/answer/10107885

My question is what device name do you have?

You can just use it instead.

I believe TeeSee has slightly misunderstood your situation. You should not be using Context("Device") at all, but the rest of the expression that he gave you pretty much shows the gist of what you need to do.

Top Labels in this Space