Custom column showing the time difference from the "Modification Date"

Have a suggestion for "Everything"? Please post it here.
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Custom column showing the time difference from the "Modification Date"

Post by IGERY »

Hello,
We have been using the search and filtering app "Everything" (version 1.5.0.1423b) for quite some time. It is more than just a file manager; it allows you to do a lot of things.
We would like to add a column between "File Name" and "Date Modified" that displays the time elapsed since (or remaining until) the "Date Modified" timestamp.
For example:
File Name | Time Elapsed | Date Modified
Trip to Sauerland 2025 | Ⓥ 1 yr, 4 mo, 6 d, 22 h, 54 min | 24.05.2025 12:47:57
Ⓥ/Ⓝ = Before/After …

Is this possible?
void
Developer
Posts: 20362
Joined: Fri Oct 16, 2009 11:31 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by void »

Currently, no.
I'll have this working in the next update with DATEDIF.

For now, please try including the following in your search:

Code: Select all

add-column:a a-label:"Time Elapsed" a:=datedif($date-modified:,now(),"y")?datedif($date-modified:,now(),"y")&" years ago":(datedif($date-modified:,now(),"m")?datedif($date-modified:,now(),"m")&" months ago":datedif($date-modified:,now(),"d")&" days ago")
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by IGERY »

Is it possible to hide this large block of code?
void
Developer
Posts: 20362
Joined: Fri Oct 16, 2009 11:31 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by void »

To create a Time Elapsed filter:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to:
    Time Elapsed
  • Change the Search to:

    Code: Select all

    add-column:a a-label:"Time Elapsed" a:=datedif($date-modified:,now(),"y")?datedif($date-modified:,now(),"y")&" years ago":(datedif($date-modified:,now(),"m")?datedif($date-modified:,now(),"m")&" months ago":datedif($date-modified:,now(),"d")&" days ago")
    
  • Click OK.
Filters can be activated from the Search menu, Filter bar (View -> Filter Bar), Filter sidebar (View -> Filters), right clicking the status bar, filter macro or filter keyboard shortcut.
Filters can be organized from Search menu -> Organize filters.
The active filter is shown in the status bar on the right.
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by IGERY »

Many thanks 👍
This thing is absolutely huge 👏👏👏
void
Developer
Posts: 20362
Joined: Fri Oct 16, 2009 11:31 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by void »

Everything 1.5.0.1424b fixes an issue with DATEDIF:

ym and md formats will now work like Excel.

For example:

Code: Select all

add-column:a a-label:"Time Elapsed" a:=datedif($date-modified:,now(),"y")&" years "&datedif($date-modified:,now(),"ym")&" months "&datedif($date-modified:,now(),"md")&" days ago"
Useful if you want to show years, months, and days ago.
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by IGERY »

The complete code for "years, months, days, hours, and minutes" is provided below. However, on some days, a minus sign ("-") appears. What could be the cause of this error? (This also occurred in version 1_5_0_1423b (x64) of Everything.)

Code: Select all

add-column:a a-label:"Vor" a:=(DATEDIF($date-modified:,NOW(),"y")?DATEDIF($date-modified:,NOW(),"y")&"J ":"")&(DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")?DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")&"M ":"")&((DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")),NOW(),"d")-(TIMEVALUE(NOW())<TIMEVALUE($date-modified:)))?((DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")),NOW(),"d")-(TIMEVALUE(NOW())<TIMEVALUE($date-modified:)))&"T "):"")&FORMATDURATION((NOW()-(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m"))+TIMEVALUE($date-modified:)+DATEDIF(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")),NOW(),"d")-(TIMEVALUE(NOW())<TIMEVALUE($date-modified:))))*864000000000,"hh:mm") add-column:a a-label:"Vor" a:=(DATEDIF($date-modified:,NOW(),"y")?DATEDIF($date-modified:,NOW(),"y")&"J ":"")&(DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")?DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")&"M ":"")&((DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")),NOW(),"d")-(TIMEVALUE(NOW())<TIMEVALUE($date-modified:)))?((DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE($date-modified:,DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")),NOW(),"d")-(TIMEVALUE(NOW())<TIMEVALUE($date-modified:)))&"T "):"")&FORMATDURATION((NOW()-(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m"))+TIMEVALUE($date-modified:)+DATEDIF(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12+DATEDIF(EDATE(DATEVALUE($date-modified:),DATEDIF($date-modified:,NOW(),"y")*12),NOW(),"m")),NOW(),"d")-(TIMEVALUE(NOW())<TIMEVALUE($date-modified:))))*864000000000,"hh:mm")
You do not have the required permissions to view the files attached to this post.
tuska
Posts: 1416
Joined: Thu Jul 13, 2017 9:14 am

Re: Custom column showing the time difference from the "Modification Date"

Post by tuska »

2IGERY

In my opinion, this is NOT an error!

The difference between 15 October 2011 and 15 October 2026 is shown.
That is 15 years minus one day – namely, the last day (= 15 October 2026).
(The last day is NOT included when calculating this difference)!
This method is used, for example, for calculating interest.

Calculation:
FROM: 15 October 2011 (including this day)
TO:     15 October 2026 (excluding this day)

Here is another example:
The difference between 1 October 2026 and 15 October 2026 is 14 days (and NOT 15 days).
The first day is included, and the last day is not.
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺
I suspect that the CODE posted most recently shows the result you were expecting:

Code: Select all

add-column:a a-label:"Time Elapsed" a:=datedif($date-modified:,now(),"y")&" years "&datedif($date-modified:,now(),"ym")&" months "&datedif($date-modified:,now(),"md")&" days ago"
The difference between 15 October 2011 and 15 October 2026 is shown == 15 years.
 
Time Elapsed.png
You do not have the required permissions to view the files attached to this post.
Last edited by tuska on Thu Oct 15, 2026 2:22 pm, edited 1 time in total.
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by IGERY »

Could you please also include "hours" and "minutes" in the format "00:00"—just like in my screenshot? I tried, but I couldn't get it to work.
tuska
Posts: 1416
Joined: Thu Jul 13, 2017 9:14 am

Re: Custom column showing the time difference from the "Modification Date"

Post by tuska »

IGERY wrote: Thu Oct 15, 2026 2:21 pm Could you please also include "hours" and "minutes" in the format "00:00"—just like in my screenshot? I tried, but I couldn't get it to work.
I'm sorry, but I don't know a solution. :?
void
Developer
Posts: 20362
Joined: Fri Oct 16, 2009 11:31 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by void »

Please try:

Code: Select all

add-column:a a-label:"Time Elapsed" a:=DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"Y")&" years "&DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"YM")&" months "&DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"MD")&" days "&HOUR(NOW()-(DATEVALUE($date-modified:)+TIMEVALUE($date-modified:)))&" hours "&MINUTE(NOW()-(DATEVALUE($date-modified:)+TIMEVALUE($date-modified:)))&" minutes ago"
and in your shorter
J M T HH:mm
format:

Code: Select all

add-column:a a-label:"Time Elapsed" a:=DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"Y")&"J "&DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"YM")&"M "&DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"MD")&"T "&TEXT(HOUR(NOW()-(DATEVALUE($date-modified:)+TIMEVALUE($date-modified:))),"00")&":"&TEXT(MINUTE(NOW()-(DATEVALUE($date-modified:)+TIMEVALUE($date-modified:))),"00")
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by IGERY »

Both codes work perfectly and as expected 👍 Many thanks 🙏
NotNull
Posts: 5991
Joined: Wed May 24, 2017 9:22 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by NotNull »

A suggestion:

Extend the duration_format with moths and years.
That would make the core of the answer to the question above rather trivial:

Code: Select all

addcol:A   A:=now()-$dm:    A-format:duration
(should also affect the related formula and preprocessor formatting function for more control)
IGERY
Posts: 8
Joined: Thu Oct 01, 2026 11:18 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by IGERY »

Hi @NotNull,
thank you for your suggestion.

We have the actual code—exactly as we want it to be.

Code: Select all

add-column:a a-label:"Vor" a-align:right a:=IF(DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"Y")>0,DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"Y")&"ᴶ ","")&IF(DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"YM")>0,DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"YM")&"ᴹ ","")&IF(DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"MD")>0,DATEDIF(DATEVALUE($date-modified:),TODAY()-IF(MOD(NOW(),1)<TIMEVALUE($date-modified:),1,0),"MD")&"ᵀ ","")&TEXT(HOUR(NOW()-(DATEVALUE($date-modified:)+TIMEVALUE($date-modified:))),"00")&":"&TEXT(MINUTE(NOW()-(DATEVALUE($date-modified:)+TIMEVALUE($date-modified:))),"00")
You do not have the required permissions to view the files attached to this post.
void
Developer
Posts: 20362
Joined: Fri Oct 16, 2009 11:31 pm

Re: Custom column showing the time difference from the "Modification Date"

Post by void »

Extend the duration_format with moths and years.
Thanks for the suggestion NotNull,

Unfortunately, Everything cannot calculate the number of months from the duration because months vary in length.
To get an accurate count of months, you need the original start and end dates.

Everything also uses FILETIMEs for duration values.
The following will work to show durations in [d]:hh:mm:ss:
addcol:A A:=FILETIME(NOW())-$date-modified: A-format:duration


It's ugly to do this in Excel too.
I have on my TODO list to add the LET function to make it easier.