I have a list of payments. They have start and end dates. I need to identify if any of those transactions spread over April 1st.
Transaction A Start Date: 2020-01-01 and End date: 2038-12-31. This transactions covers April 2022.
Transaction B Start Date: 2023-04-01 and End date: 2030-05-01. This transaction does not cover April 2022.
Note: April 2022 is anything from April 1st to April 30th (or just April 2022).
Hi @IrynaK , I’m not entirely sure what you mean by “I need to identify if any of those transactions spread over April 1st.”, but the assumption is that for a transaction to “cover April 2022”, it means that the whole of April (April 1st to April 30th) has to be part of the transaction date range.
Based on this assumption, you just need to check if your Start Date is <= 2022-04-01 AND End Date >= 2022-04-30, that’s all.