Hi
Is it possible to filter a record with a time range on a datetime field?
I need to pick up all the lines that are inside a time range, between two dates, with only a datetime field...
Do I need to create a new field with the time section of the datetime field...!? (and update historic values with this new data)
Any suggestion?
Thank you in advance!
*This post is locked for comments
yes, a Time field will be much faster for sure. This will be for sure the best way to do if you can create it in your table.
Thanks you.
Hope that I will not have performance issues...
I will try that way.
If it will be too slow, I think that a new time field (as key), will be much faster, right?
I need to filter several thousands of lines, 5 times (five ranges of times) in the same report...
I'm wondering (another approach) if I send all the lines between dates to the report (with no time range column), and then create there 5 tablix, with same data BUT with group filters based on the different time ranges... it will do the work faster?
Thanks for the help!
Ok now I understand your requirement. There’s no such possibily. I think you can solve that in few steps:
1) filter your record from Date1,17.00T to Date2,18.00T
2) loop through this set of records and mark the records that has the time in your desired range
3) retrieve only the marked record (MARKEDONLY(true))
Thank you.
But I believe that I would get all the lines between the 00:00 of Date 1 and the 18:59 of Date 2. Is that correct?
I need all the lines between, let's say, 1700T and 1800T, of each day between 030118D and 100118D.
If want to pick the 050118 1730DT value but not the 050118 1000DT .
You can filter the datetime field directly:
YOURTABLE.SETRANGE(YOURFIELD,CREATEDATETIME(Date1,0T),CREATEDATETIME(Date2,18.59T));
This sample filters between two dates (Date1 and Date2) in a certain time range.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156