Advanced Search on Date Field

Viewing 4 reply threads
  • Author
    Posts
  • May 30, 2017 at 5:33 PM #23307

    Steve Cross
    Participant

    I need to be able to select based on time of day, but the “advanced search” seems to have an issue with specifying either am/pm or else 24 hour time. For example, when I create a rule for:

    Date_Field “is on or after” [5/30/2017, 5:51]

    it appears to be impossible to enter an hour greater than 12 or else to specify either AM or PM in the condition field. Which makes it impossible to select say, 1:30 pm (13:30) without also returning 11:00 am, etc.

    Day, Month, etc. all work fine, but I often need to select on criteria more finely grained than full days. Hopefully, I’m just overlooking something.

    Thanks

    May 31, 2017 at 3:12 AM #23310

    Brendan
    Keymaster

    Hi Steve

    Check the Date Format setting in the Sustem Preferences app. See if you have all the fields specified properly for the different formats such as Short, Medium, etc. I’ll have to look at my code to see which one it uses. I’m just on a train to Scotland right now so I’ll look at that later when I have time.

    May 31, 2017 at 5:45 PM #23318

    Steve Cross
    Participant

    Hi Brendan,

    First off, this isn’t an emergency. I can work around by manually de-selecting a few extra records as needed.

    However, I’m guessing you will probably want to take a look because someone else will probably have a more urgent need than I do. The field I’m trying to filter on is a “Date Created” type. In a nutshell, I batch enter a group of records, and then when I get a few minutes, I “process” the current batch — which in this case consists of depositing some checks (among other things). I like to be able to use the “total” calculation on the “amount” field as a double check on my math on the deposit slip. And this works great as long as the batches end on day boundaries.

    But if I happen to make a bank run in the early afternoon, including the morning records, and then start a new “batch” the afternoon of the same day, I’m unable to set the “is on or after” date/time correctly. I first noticed this when my system (MBpro-2012) was set on 12 hour am/pm time. The comparison date/time “hours” range is locked to “1-12” and there is no way to select am or pm. If I change the system time to 24 hour, then the allowed range switches to 00-23, which seems correct, but still doesn’t work.

    As you suggested, I verified the Short, Medium, etc. time formats (and actually tried a bunch of variations) but to no avail.

    It appears to me that the “Date” logic works correctly, but the “Time” logic is a little flakey. I can play with the time formats (in both SysPrefs and TapForms) and the display varies accordingly (and correctly), but the actual record selection is wrong.

    For example, when using 12 hour time, setting the “filter” at “11:59” (am/pm is not available), selects 11:18 AM (wrong) and 6:39 PM (right). Even when switching to 24 hour time (and changing the various formats to display correctly) the same problem occurs, i.e. “11:59” (or 13:59 etc.) will select both 11:18 and 18:39.

    Like I said, not an emergency for me, but curious nevertheless. Sorry to make such a long post, but I hope I’ve given enough information to help troubleshoot.

    P.S. Thanks very much for adding iCloud support. It seems to be a lot more responsive and less “fiddly” than the local sync option. Never tried Cloudant.

    Also, kudos on the Apple watch support. I thought it wouldn’t be something I would use, but I’ve found it to be be very handy on several occasions and it really impresses the bystanders — “A database on your watch!!!!”

    June 1, 2017 at 3:47 AM #23319

    Brendan
    Keymaster

    I think part of the problem is that the field isn’t wide enough on the advanced search popover for getting access to the AM/PM setting. It is there though if you use the arrow keys to move right and then when the cursor disappears, you’re on the AM/PM part and using the up/down arrow keys will change it. I know that’s stupid of course. I’ll make that field wider so it shows the full thing.

    However I think the bigger issue is that Tap Forms is ignoring the time for those specific operators. It’s specifically treating Date/Time fields (including the Date Modified and Date Created fields) as Date fields and setting the time to the beginning or end of the day depending on the operator being used. I’ll work on a fix for that.

    June 1, 2017 at 7:42 PM #23320

    Steve Cross
    Participant

    Thanks Brendan.

    Like I said, not an emergency for me, so unless you have other people that need it, I can easily wait until the next release.

    Thanks again.

Viewing 4 reply threads

You must be logged in to reply to this topic.