I have a formula pulling relevant columns from a different document. It is working well except for the last part regarding the dates. It is seemingly ignoring that part of the formula and returning all dates.
=query(importrange("https://docs.google.com/spreadsheets/d/1kwhv2eGCRPbNTg-gVMPGZ-Yx9ScRCiqlkIwxTfaEwcY/edit#gid=1133073756", "TRANSACTIONS!A6:P"), "select Col2,Col3,Col7,Col14,Col15 where Col3='FEE' OR Col3='WITHDRAWL' OR Col3='TRANSFER' OR Col3='CREDIT CARD' and Col2 >= date '"&to_text("2024-04-01")&"' AND Col2 < date '"&to_text("2024-05-01")&"'")