how to retrieve a set of objects based on time attribute?

Hi guys, what's the best way to retrieve a list of objects constrained by a datetime attribute, but only based on the time not the date (e.g. all objects stored with time stamp of 23:00:00, independent of what date they've been stored). This without using a java action. We basically need to apply a fix due to some issue with UTC formatting and I cannot see an adequate function to just grab the appropriate objects. I was trying to grab the value as a string, but some functions are not available on retrieve activity (or with a date argument). LR.
2 answers


Are you trying to do this in XPath? Have you tried hours-from-dateTime (documentation here? If so, where did you run into problems with that? Just trying to understand more what you need to accomplish and what you've tried.




You have to itterate over all the objects. You should do the custom retrieve with limits and offset so you handle let's say 100 objects at a time. When you iterate over the objects you can then check the time of the attribute ( see the documentation here to see how to get the hour as integer: If the time is wrong adjust it otherwise continue with the next iteration. Hope this helps,