This would change 'everything' especially for pinpointing duplicates. I know it's been said before that arithmetic with date and times is in development but I hope someone can shed some light how close are we to this ? Or has progress been made already with past updates?
Ticks vs. 100-nanoseconds which is more accurate for date and time differences?
[update] According to microsoft learn document, a single tick represents one hundred nanoseconds which equates to the time elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar.
source: https://learn.microsoft.com/en-us/dotne ... ew=net-7.0
Date and time arithmetic
Re: Date and time arithmetic
Everything stores timestamps as FILETIMEs ( 100-nanosecond intervals since January 1, 1601 (UTC) )
Use eval: to perform arithmetic on FILETIMEs.
For example:
eval:$dm:/10000000!=$dc:/10000000
eval:
Use eval: to perform arithmetic on FILETIMEs.
For example:
eval:$dm:/10000000!=$dc:/10000000
eval:
Re: Date and time arithmetic
What if I want to have difference in seconds between date taken and date modified rather than (eval syntax)dm:!date-taken:void wrote: ↑Wed Feb 22, 2023 11:31 pm Everything stores timestamps as FILETIMEs ( 100-nanosecond intervals since January 1, 1601 (UTC) )
Use eval: to perform arithmetic on FILETIMEs.
For example:
eval:$dm:/10000000!=$dc:/10000000
eval:
Re: Date and time arithmetic
Everything doesn't store timestamps in seconds.
Everything stores timestamps as FILETIMEs.
You'll need to convert FILETIMEs to seconds and then compare. (for example: /10000000 )
To compare date taken in seconds with date modified in seconds, please use:
eval:$date-taken:/10000000==$dm:/10000000
I'll consider adding a function to convert FILETIMEs to seconds as 10000000 is not an easy number to remember..
Everything stores timestamps as FILETIMEs.
You'll need to convert FILETIMEs to seconds and then compare. (for example: /10000000 )
To compare date taken in seconds with date modified in seconds, please use:
eval:$date-taken:/10000000==$dm:/10000000
I'll consider adding a function to convert FILETIMEs to seconds as 10000000 is not an easy number to remember..
Re: Date and time arithmetic
eval:$date-taken:/10000000==$dm:/10000000void wrote: ↑Thu Feb 23, 2023 2:44 am Everything doesn't store timestamps in seconds.
Everything stores timestamps as FILETIMEs.
You'll need to convert FILETIMEs to seconds and then compare. (for example: /10000000 )
To compare date taken in seconds with date modified in seconds, please use:
eval:$date-taken:/10000000==$dm:/10000000
I'll consider adding a function to convert FILETIMEs to seconds as 10000000 is not an easy number to remember..
But this is comparing the filetimes not calculating the difference because there is an == sign
Re: Date and time arithmetic
Use column formulas
addcolumn:column1 column1:=$dm:/10000000-$date-taken:/10000000
Column 1 will show the difference in seconds.
addcolumn:column1 column1:=$dm:/10000000-$date-taken:/10000000
Column 1 will show the difference in seconds.
-
- Posts: 505
- Joined: Thu Dec 15, 2016 9:44 pm
Re: Date and time arithmetic
Rather than a function per se, perhaps there could be a constant tosecs whose value is 10000000? then you'd just need yourtimestamp/tosecs or *tosecs for the reverse.
d
d
Re: Date and time arithmetic
I will consider a tosecs constant.
Thank you for the suggestion.
Thank you for the suggestion.