Announcements
Hi Everyone,
Example: If date today is 31/03/2024 I need my gallery to get all items going back to 01/03/2024 12:00PM.
So anything before 01/03/2024 12:00PM is excluded.
My failed attempts at this was only returning PM items. Would greatly appreciate some help on this 🙂
hey @Righty
can you try this please:
// Calculate the start date Set( startDate, DateTimeValue( Text( DateValue( Text(Now(), "yyyy-MM") & "-01" ) ) & " 12:00 PM" ) ); // Use this in your gallery's Items property to filter based on the start date Filter( DataSource, yourDateTimeField >= startDate )
Let me know if my answer helped solving your issue.If it did please accept as solution and give it a thumbs up so we can help others in the community.Greetings
Set(StartDate, DateTimeValue(Text(DateValue(Text(Now(),"yyyy-MM") & "-01"))& " 12:00 PM") ); Filter(Source, Column>=StartDate)
This shall definitely work.
Hey @mmbr1606
I got a error trying this: 'The value '2024-MM-01 cannot be converted to a date or time value.'
When i use the Now() function the output = 06/05/2024, 17:00:34
Im in New Zealand and the date format is dd/MM/yyyy here. Not sure if thats the issue?
Thanks
Hi @Righty,
Please switch to lower case "m", like this:
Set( startDate, DateTimeValue( Text( DateValue( Text(Now(), "yyyy-mm") & "-01" ) ) & " 12:00 PM" ) );
Have a great day!
Kind regards,
Gonçalo Melo
Thanks everyone, the code has worked now 🙂
Can you mark my answer as solution, if it all it helped you in any way?
Hi All,
I've got a strange problem, so the code works in Chrome and filters items correctly. But in MS Edge the filter completely breaks and shows all items.
I have updated Edge and cleared all cookies and cache but the problem remains.
I even embed into the teams app it works correctly.
Any ideas?
I managed to fix it, issue is related to the language setting in browser which swapped around to mm/dd. So I force set it in the app by adding the language code argument en-GB. e.g DateValue(var_datetime, "en-GB")
Which changed it back to dd/mm again
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 509 Most Valuable Professional
Haque 302
11manish 265