Jump to content

SQL for requests updated this month


TSheward_SGW
 Share

Recommended Posts

Hello All,

We managed to create a Counter List widget to show the number of requests updated this week, the code for which is below:

h_datelastmodified >= curdate() - INTERVAL DAYOFWEEK(curdate()) -1 DAY

Does anyone know how to adjust it to show the number of requests updated this month?

Many thanks,

Tom

HBWidget.png

Link to comment
Share on other sites

Hi @TSheward_SGW

I believe the below should return everything that has been modified from (and including) the first day of the current month:

h_datelastmodified >= LAST_DAY(NOW() - INTERVAL 1 MONTH) + INTERVAL 1 DAY

Can you give it a try and see if that works?

Kind Regards

Bob

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...