Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to get visits within 36 hrs. Here is what I have:
Interval(ReArrivalDateTime-DepartDateTime,'hh') as ReVisitHrs
Then I am using a Listbox with Field 'ReVisitHrs' for selecting specific hrs. The problem is that the listbox shows duplicate hours such as 01, 01, 01 instead of just 01. How can I fix the logic for listbox to not contain duplicate values?
Example:
| ReArrivalDateTime | DepartDateTime | ReVisitHrs |
|---|---|---|
| 9/3/2016 19:34 | 9/3/2016 17:50 | 01 |
| 9/15/2016 21:37 | 9/15/2016 20:36 | 01 |
Current Listbox display:
| ReVisitHrs |
|---|
| 01 |
| 01 |
Thank you.
My bad, you are right.Try this:
Interval(Round(ReArrivalDateTime-DepartDateTime, 1/24),'hh')
Try using Hour instead of Interval:
Hour(ReArrivalDateTime-DepartDateTime)
That did not work. I see using Interval is giving me the right hrs difference but it's just that it is displaying duplicates in the listbox. I am wondering if I can just use a Listbox expression such as IF(ReVisitHrs>=0 and ReVisitHrs<=36, 'Visit within 36hrs', 'No Match'). Not getting it right yet. Thanks.
My bad, you are right.Try this:
Interval(Round(ReArrivalDateTime-DepartDateTime, 1/24),'hh')
Great. That did the trick. Thanks so much once again Sunny.
No problem Vishal ![]()