What am I missing here!? I must be tired.
Scenario:
- Gallery full of Filenames
- Filename example = 003907302020UMT002.xlsx
- 4 digit numeric prefix
- mmddyyyy date
- 6 char suffix
- File extension
- App has two date pickers: Start Date and End Date
- Trying to filter gallery where filename date portion is greater than Start Date and less than End Date
- Mid(ThisItem.Filename, 5, 8 ) gets me what looks correct: 07302020, but this is not a DateValue to compare against the DatePicker SelectedDates
- However DateValue(Mid(ThisItem.Filename, 5, 8)) returns: 8/20/731!
- Tried DateValue(Text(Mid(ThisItem.Filename, 5, 8), "mmddyyyy")) but this also returns 8/20/731
Whats going on here?
Hi @ericonline ,
Try
With(
{
wDate: Mid(
ThisItem.Filename,
5,
8
)
},
DateValue(
Left(
wDate,
2
) & "/" & Mid(
wDate,
3,
2
) & "/" & Right(
wDate,
4
)
)
)
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 the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
256 | |
108 | |
97 | |
51 | |
39 |