Explicitly constraining listview by date

0
I have a use case where i need to explicitly contrain a listview by a given date.  I tried putting an XPath contraint with the date in the proper format, but it gives me 0 results even though I know there are results on that date.  
asked
5 answers
1

This is working:

[day-from-dateTime(Date)=18
and
month-from-dateTime(Date)=1
and
year-from-dateTime(Date)=2018]

or this, but it's not very readable

[Date=1516233600000]

 

answered
1

A thought regarding this:  in your original posting, you showed a specific date/time, i.e. midnight on 2017-07-21.  In my experience, its pretty rare that a date time value matches an exact timestamp - which is what the date literal is converted to.  So perhaps a range would work, i.e. >= 2017-07-21 and < 2017-07-22?

answered
0

I think explicitly stating the date in the xpath converts it to a localized time (so UTC plus the offset of whatever timezone you are in), meaning the timestamps won't match.

Could you try creating a DateTime variable and using parseDateTimeUTC()? Using your string date and corresponding format and then using the variable in the xpath?

That would require a datasource microflow, and I don't know if this will fit your case, but you can use it to verify if that's really the problem.

answered
0

Anyone have any ideas?

answered
0

Bumping this to the top again.  Is the answer simply that you cannot create an Xpath constraint with an explicit date?

answered