I have a list of periods (typically 2-3 days), marked by begin date & time and end date+time
and I have a list of moments (date + time). All periods are connected, no gaps in between them.
These moments are often on days that don’t appear in the period list.
How can I detect in which period each moment falls?
Unless I misunderstand, you should just be able to use >< operators
Date/time values are really just numbers under the hood.
So trying to find out if a date falls in a period of time is like trying to find out if a number exists outside or inside a boundary
Does the number 7 exist inbetween 4-10?
7> numbers.first() and 7< numbers.last()
Does that help? Or are you looking for something else?
hi @Pieter-Jan_Ardies ,
Could you or share a doc or some screenshots?
as @Scott_Collier-Weir indicated correctly, dates (and time) are numbers we can compare using logical operators.
a while ago I wrote a blog about something alike, maybe it gives some inspiratie. I guess however that your question can be solved in an easier manner.
Cheers, Christiaan
Thanks!!
The thing is that the data is in 2 separate tables. some pics will make it clearer:
Table 1 contains the moments, and should get a new column in which the display column value of table 2:
Table 2 contains the start and end date of a period and the name, which should be referred in table 1
Thanks, @Christiaan_Huizer , I have shared screenshots and a clearer version of my question as answer to @Scott_Collier-Weir 's first response.
something like this, but you need better sample data to see it at work
the better you inform us, the more we can of help, cheers, Christiaan
Of course… a simple filter.
I can easily get overwhelmed if I don’t find the answer straight away. Most of the time I find aswers in the community, but this time I couldn’t because I was looking too far…
thanks @Christiaan_Huizer !!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.