How to read data on snippets from a table with the condition that the date is this month?
Welcome to the forum
You can use our
datetimeformat function in BSQL to extract the month from the
Date column and provide conditions on that. Here is an example of the same.
Thank you for your help,
next how to determine the month to be dynamic
according to the current month without changing the code every month
You can use the
now() function to do that. In this example, your query will become
SELECT Name, `Joining Date` FROM Dates WHERE datetimeformat(`Joining Date`, "MM") = datetimeformat(now(), "MM").