I'm trying to set a slider so that I can use that to filter by created date in my data. How can I set a variable to earliest date and latest date in my created date column?
Earliest_CreatedDate and Latest_CreatedDate_1 are Controls and not a Date. You need to obtain value of the Control and then convert into Date.
Try:
DateValue(Earliest_CreatedDate.Text)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.
@happyume Thanks for your help! I was trying to do a datediff between the two variables, but running into an error - would you happen to know why (I put the datediff in the Max), see screen shot, any help is appreciated.
Assuming you have a SharePoint List, you can use formula as below:
Min: First(Sort('YourSharePointList',Created,SortOrder.Ascending)).Created
Max: First(Sort('YourSharePointList',Created,SortOrder.Descending)).Created
I didn't suggest to use Min() function because it is not delegable in SharePoint.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional