Page 1 of 1
Search on specific date
Posted: 07 Sep 2013 06:02
by danman
As I peruse the forum and have more time to digest the documentation, I'm sure I'll cut down on what probably seems elementary to many of you, but another question:
When I do a search for a file, I'm prompted for BEFORE and AFTER dates. Is there a way to get xy to prompt for a specific date...so I don't have to select a range when I'm only looking for a specific date?
Re: Search on specific date
Posted: 07 Sep 2013 07:23
by j_c_hallgren
danman wrote:As I peruse the forum and have more time to digest the documentation, I'm sure I'll cut down on what probably seems elementary to many of you, but another question:
We (except for Don/Admin, of course!) were all newbie's to XY at one point so as long as you attempt to find answers yourself first, we can attempt to help you when you can't locate it.
When I do a search for a file, I'm prompted for BEFORE and AFTER dates. Is there a way to get xy to prompt for a specific date...so I don't have to select a range when I'm only looking for a specific date?
It's been ages since I needed that specific situation so had to check myself

and what I found was you might put date only in "Between" field and put "1" in "and/add" which means 1 day after the between date...I think that will get you just that one date (had limited data to try it on)...check out the options provided via the little orange arrow after the "between" field...I've found those helpful...
Re: Search on specific date
Posted: 07 Sep 2013 09:46
by admin
Or enter "1s" in the second field to just find files within the next second.

But actually, wow, there is a bug here!
Entering the same dates in both fields should find any files exactly matching those dates (there is even a function for this in the dropdown menu on the Date tab: "Like..."), but it does not anymore (regression alert)! Fix coming...
Re: Search on specific date
Posted: 07 Sep 2013 10:25
by j_c_hallgren
admin wrote:Or enter "1s" in the second field to just find files within the next second.
I tried that in my test and it didn't find the file that I used as test data -- I suspect because the time used on "between" when only date is keyed is defaulted to 0:00:00 and thus using "1s" as end would mean that file timestamp would have to be 0:00:00 or 0:00:01, right? And that excludes any files for the rest of that day, it seems...That's why I had to use 1 day as span to get the hit I should...or am I missing something? Because to get matches on any time on that one specified day/date, the time range needs to be from 0:00:00 to 23:59:59 as I see it.
Re: Search on specific date
Posted: 07 Sep 2013 10:33
by admin
That's probably related to that regression bug (which came with the milliseconds support). Fix is on the way...
Re: Search on specific date
Posted: 07 Sep 2013 15:29
by j_c_hallgren
admin wrote:That's probably related to that regression bug (which came with the milliseconds support). Fix is on the way...
Ok -- but still a variant of my question remains: Is there an quick way to setup search for one day only, like 02/13/2013, without having to key it in both fields? So keying 10 chars for date isn't all that hard (but could lead to typos) and as I posted query above, wouldn't using a "1s" value make it look for 0:00:00 to 0:00:01 only? And leaving "and" field empty defaults it to 'now', which wouldn't work for this case, right? So having some short way to clone/copy "between" value would seem to make sense...maybe use a "=" to say 'use between date here also'?
Re: Search on specific date
Posted: 07 Sep 2013 15:56
by admin
Yes, 1s would mean that second. 1 or 1d would mean that day.
So this would work:
I don't see how this could be achieved with fewer keystrokes.
Re: Search on specific date
Posted: 07 Sep 2013 17:19
by j_c_hallgren
admin wrote:Yes, 1s would mean that second.
That's what i thought...so...
1 or 1d would mean that day.
So this would work:
I don't see how this could be achieved with fewer keystrokes.
I wasn't saying it needed to be less than one char, but just was suggesting that maybe an '=' could be converted to '1d' internally IF only a date was keyed into 'between' since the '=' may be more easily remembered for us who don't use it often and saying the value should be same as other field is thus implied...if one keyed a full date+time into 'between', then use of '=' would say entire value be same, not just the date portion...just an idea, ok?
Re: Search on specific date
Posted: 07 Sep 2013 17:31
by admin
Difficult because any date without a time part is internally converted to having a 00:00:00 time part before the "=" would be parsed. "=" would then result in the same as "1s".
So to make this work as intended more things would have to be changed, a chain reaction not worth it given that there is a time-tested solution already present.
Re: Search on specific date
Posted: 07 Sep 2013 18:06
by j_c_hallgren
admin wrote:Difficult because any date without a time part is internally converted to having a 00:00:00 time part before the "=" would be parsed. "=" would then result in the same as "1s".
So to make this work as intended more things would have to be changed, a chain reaction not worth it given that there is a time-tested solution already present.
Ahhh..hummm...then an much easier way to help users would be another small blurb in that portion of help saying "use 1 to match a specific date" or similar might make it clearer because as now, it might be interpreted as date + 1, like 02/13/2013 to 02/14/2013 by some...or could using a value of 0 (default days) be alternative which is how I first tried it?
Re: Search on specific date
Posted: 07 Sep 2013 18:49
by admin
"1" works because "day" is the default here. The full form is "1d" which is more intuitive I think.
I don't think anything has to be done. These functions are in the program for more than 10 years and I think it was only that little regression bug from June that caused the feature to appear in the forum.