I have created a 6 events.
In that 3 was created in January and another 3 was created in February.
I want to fetch the events created in current month.
For that I have used query builder in Umbraco and the query was
.Where(x => (x.CreateDate.Month >= DateTime.Now.Month)) // swap Date with Month
Using an IDE like VisualStudio or JetBrains' Rider will give you some magic-like autocomplete called Intellisense that helps you discover what options are available to objects and other aspects fof your code in order to construct queries, etc…
Hope this helps!
*edited with adding .Month on the tail of the CreateDate as Harikrishna points out below. I expanded from a simpler posting and didn't catch all the pokemon along the way
How to get current month event
Hi Everyone,
I have created a 6 events. In that 3 was created in January and another 3 was created in February. I want to fetch the events created in current month. For that I have used query builder in Umbraco and the query was
I'm getting today created event but how to get it month wise????
-Jothipriya
Using an IDE like VisualStudio or JetBrains' Rider will give you some magic-like autocomplete called Intellisense that helps you discover what options are available to objects and other aspects fof your code in order to construct queries, etc… Hope this helps!
*edited with adding
.Month
on the tail of the CreateDate as Harikrishna points out below. I expanded from a simpler posting and didn't catch all the pokemon along the wayHi Jothipriya,
if you want to get all events created in current month, You should try this condition:
Hope this will help you!!
Thanks, Harikrishna.
good catch - high five!
Yeah! It's working good thankyou.
is working on a reply...