column1 and date modified match but doesn't match with syntax

Discussion related to "Everything" 1.5 Alpha.
Post Reply
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

column1 and date modified match but doesn't match with syntax

Post by anmac1789 »

Hello everyone, so I have a custom column1 with the date taken in utc time. But when I match the date modified and custum column1, the two columns don't match even though the entries in them match. Here is a screenshot.
Screenshot 2023-10-02 144322.png
Screenshot 2023-10-02 144322.png (155.62 KiB) Viewed 4349 times
[update] Here is an additional screenshot which shows that no results are shown:
Screenshot 2023-10-02 153527.png
Screenshot 2023-10-02 153527.png (24.09 KiB) Viewed 4329 times
Last edited by anmac1789 on Mon Oct 02, 2023 7:36 pm, edited 1 time in total.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: column1 and date modified match but doesn't match with syntax

Post by therube »

Thinking (?) the issue is going to be:
The dates must match exactly to be considered a duplicate.
FILETIMEs are used for dates.
And there is going to be discrepancies between "disk" date & exif date.


(Similar, dupe:dm, tolerance ?)
when I match the date modified and custum column1
What is your search string for that?


(PS: Why not keep the same thread going as this is just a follow-on to the other threads.)
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: column1 and date modified match but doesn't match with syntax

Post by anmac1789 »

therube wrote: Mon Oct 02, 2023 6:56 pm
And there is going to be discrepancies between "disk" date & exif date.
How is that possible when in the screenshot you can see that column1 dates match exactly to the date modified upto the exact second as well since the milliseconds and further fields are all 0's
therube wrote: Mon Oct 02, 2023 6:56 pm
when I match the date modified and custum column1
What is your search string for that?
My search string is date-modified:=column-1
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: column1 and date modified match but doesn't match with syntax

Post by tuska »

2anmac1789

I think it would be very helpful for a user or the author of Everything,
if you would publish your complete search queries from the search box in Everything here as code (Button: </>) in the forum.

This would save a lot of time for those who want to help you with your query
or maybe encourage some interested users to try out your query and maybe give feedback.
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: column1 and date modified match but doesn't match with syntax

Post by anmac1789 »

tuska wrote: Mon Oct 02, 2023 9:37 pm 2anmac1789

I think it would be very helpful for a user or the author of Everything,
if you would publish your complete search queries from the search box in Everything here as code (Button: </>) in the forum.

This would save a lot of time for those who want to help you with your query
or maybe encourage some interested users to try out your query and maybe give feedback.
sorry about that I didn't type a search query because the files or dates would have been different for each user, hence why I didn't but in case you need it:

Code: Select all

20220818 add-column:column-1 column-1:=formatfiletimeutc(date-taken:)
I chose '20220818' to search for files that were taken in Aug 18, 2022

The next code is to filter only those files for which column1 and date modified match (if any, in my case, there are matches but somehow everything doesn't display them). Please note that I didn't do it the other way around because column1 would just have date modified in it which is redundant.
column-1:=date-modified:

Code: Select all

20220818 add-column:column-1 column-1:=formatfiletimeutc(date-taken:) date-modified:=column-1:
Last edited by anmac1789 on Tue Oct 03, 2023 4:54 pm, edited 1 time in total.
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: column1 and date modified match but doesn't match with syntax

Post by void »

column-1:=formatfiletimeutc(date-taken:) date-modified:=column-1:
Formatted filetimes will never match unformatted filetimes



Please try the following eval search:

formatfiletimeutc($date-taken:)==formatfiletimeutc($date-modified:)

Using $property-name: in your search will force Everything to evaluate the expression.
If the expression is non-zero the file is shown.
== means equal to
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: column1 and date modified match but doesn't match with syntax

Post by anmac1789 »

void wrote: Tue Oct 03, 2023 8:40 am
column-1:=formatfiletimeutc(date-taken:) date-modified:=column-1:
Formatted filetimes will never match unformatted filetimes
Both filetimes in column1 and dm: are in the HH:mm:ss tt format so wouldnt they get matched ?
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: column1 and date modified match but doesn't match with syntax

Post by void »

No.

dm: is unformatted and represented as a FILETIME.

You'll want to format both.



If you want to visually see the formatted text for comparison, please store both in custom columns:

column-1:=formatfiletimeutc(date-taken:) column-2:=formatfiletimeutc(date-modified:) column-1:==column-2:



You can compare the properties directly with:

date-taken:==date-modified:

However, this uses a FILETIME comparison which matches down to the 100-nanoseconds.
-I guess this is why you are formatting the date/times to compare with second only resolution.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: column1 and date modified match but doesn't match with syntax

Post by tuska »

anmac1789 wrote: Mon Oct 02, 2023 10:13 pm
tuska wrote: Mon Oct 02, 2023 9:37 pm 2anmac1789

I think it would be very helpful for a user or the author of Everything,
if you would publish your complete search queries from the search box in Everything here as code (Button: </>) in the forum.

This would save a lot of time for those who want to help you with your query
or maybe encourage some interested users to try out your query and maybe give feedback.
sorry about that I didn't type a search query because the files or dates would have been different for each user, ...
Thank you for announcing the complete search query as CODE. :)
In this case, I was interested in the topic - but I could not have helped you.

I think that it is nevertheless very helpful to always announce the code,
because then it can be COPYED and adapted, rather than having to be written from scratch,
which is always error prone.
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: column1 and date modified match but doesn't match with syntax

Post by anmac1789 »

void wrote: Tue Oct 03, 2023 8:40 am
column-1:=formatfiletimeutc(date-taken:) date-modified:=column-1:
Formatted filetimes will never match unformatted filetimes



Please try the following eval search:

formatfiletimeutc($date-taken:)==formatfiletimeutc($date-modified:)

Using $property-name: in your search will force Everything to evaluate the expression.
If the expression is non-zero the file is shown.
== means equal to
Do you mean to use your code like this ?

replace

Code: Select all

formatfiletimeutc($date-taken:)==formatfiletimeutc($date-modified:)
with

Code: Select all

eval:formatfiletimeutc($date-taken:)==formatfiletimeutc($date-modified:)
????????? In this case, no files were matched

void wrote: Tue Oct 03, 2023 8:59 am No.

dm: is unformatted and represented as a FILETIME.

You'll want to format both.



If you want to visually see the formatted text for comparison, please store both in custom columns:

column-1:=formatfiletimeutc(date-taken:) column-2:=formatfiletimeutc(date-modified:) column-1:==column-2:



You can compare the properties directly with:

date-taken:==date-modified:

However, this uses a FILETIME comparison which matches down to the 100-nanoseconds.
-I guess this is why you are formatting the date/times to compare with second only resolution.

I think you mean that utc is for date-taken and date modified is just regular human formatted formatfiletime(date-modified:) instead of utc. Is there a difference to use == or = ?
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: column1 and date modified match but doesn't match with syntax

Post by void »

Do you mean to use your code like this ?
Without eval:

Code: Select all

formatfiletimeutc($date-taken:)==formatfiletimeutc($date-modified:)
You can prefix with eval: and should see the same results.
This likely means you have no files where the date-taken matches the date modified down to the second.


I think you mean that utc is for date-taken and date modified is just regular human formatted formatfiletime(date-modified:) instead of utc.
formatfiletime() will format the filetime in local time.
Date Taken and Date Modified are stored as UTC internally.
You might be seeing some weird local time -> UTC when the Windows Property System gathers the date taken.
Check the Date Taken Column and the Date Taken as UTC with:
add-column:column-1 column-1:=formatfiletimeutc(date-taken:)


Is there a difference to use == or = ?
depends on the context.
Please try to use == for comparison
= can be used for assignment. -If assignment is not possible it is used as comparison.

Assign abc to column1:
column1:=abc

Compare column1 to column2:
column1:==column2:

Compare date modified with date taken:
dm:=date-taken:
(dm cannot be assigned -so use comparison)

Compare date modified with date taken:
dm:==date-taken:
anmac1789
Posts: 668
Joined: Mon Aug 24, 2020 1:16 pm

Re: column1 and date modified match but doesn't match with syntax

Post by anmac1789 »

void wrote: Wed Oct 04, 2023 1:21 am
You might be seeing some weird local time -> UTC when the Windows Property System gathers the date taken.
Check the Date Taken Column and the Date Taken as UTC with:
add-column:column-1 column-1:=formatfiletimeutc(date-taken:)

This is what I think too like, I messaged microsoft forums and also sent a feedback request that some buggy issue is happening for files with summer dates when switching from EDT (summer time) into EST (winter timezone) in my region. I didn't receive a reply back but basically the date modified should stay consistent all throughout the year because auto adjust DST is enabled.
Post Reply