Age() will return rounded values, so only seconds will always be correct for the intended purpose. Let's stay with your original formula and just apply the formatting:
secs = Age(modifieddate, "s");
ss = secs Mod 60 As "#2";
mm = secs / 60 Mod 60 As "#2";
hh = secs / 60 / 60 Mod 24 As "#2";
dd = secs / 60 / 60 / 24 Mod 365 As "#3";
yy = secs / 60 / 60 / 24 / 365 As "#2";
return yy + ":" + dd + ":" + hh + ":" + mm + ":" + ss;
The short piece of code posted by @lxp (2 posts upwards) works perfect - just paste it in the evaluator code field (Settings > File Display Columns > Evaluator columns), give it the name āAgeā, choose the category Date and Time.
I liked this Age column idea, but my own preferred version aims at āquick impressionā of age rather than precision. I also use createddate instead of modifieddate, because Iām not so much interested when I made the last change, I want a quick impression how long files have been on my system. I also use the āSupport markupā option in the evaluator column setup to make the year stand out.
So this is my version:
days = Age(createddate, "d");
mm = Ceil((days Mod 365) / 30.4) As "#2";
yy = days / 365;
return "<b>"+yy+"</b><i>."+mm+" y</i>";
This is what it looks like, year plus number of months:
Ok it is in there, at the far right, but my script log threw a syntax error.
So this version works fine:
secs = Age(modifieddate, "s");
ss = secs Mod 60 As "#2";
mm = secs / 60 Mod 60 As "#2";
hh = secs / 60 / 60 Mod 24 As "#2";
dd = secs / 60 / 60 / 24 Mod 365 As "#3";
yy = secs / 60 / 60 / 24 / 365 As "#2";
On my first try I used the copy button from your first post, so the syntax error is line 1 position 1, the xml header.
Getting rid of that xml text, it works. And then I had another error, a ābad actingā error. I thought itās because you missed the first line in the eval, but you didnāt, my fault.
Oh? Well date accessed is basically a paperweight anyway, because the system can touch the date, and consider that āaccessedā. I had a huge rant about this a while back. Iām not sure how many people actually find date accessed useful. The reason itās not popular is probably because itās logically nonsense.
Maybe it is ālogicallyā nonsense, but for sensitive data I guess logging last accessed date would make sense. By contrast, being able to alter it (falsify it) would not make any ālogical senseā. In a way, being able to change any of these dates via editing does not make any ālogicalā sense whatsoever.
Did the system access the file or the user? And what is meant by system? And how was it accessed? If I open a document program that on its welcome dashboard is a list of recent files, are those files considered accessed because the system had to read them to display them in the list? Or is only opening the file in the interactive gui considered accessed? And if itās a program (not the OS) that executes a read function, is that still system or is it user? If a program is set up to do something automatically but the user set that up, is that still system or is it now user?
Is an antivirus scanning things considered accessed? What about an onboard cloud service updating files? I have to āsaveā a file, overwriting it to be āmodifiedā but what about even programs like Dopus displaying metadata in its columns? It has to read the files to display it. Does that touch the accessed date? And if those kinds of things do, then accessed is entirely useless, since that data is whitewashed every time you open a folder and look at the contents.
Wouldnāt it be nice to see exactly what is reading files and when, and how often? And if and when files are copied/exfiltrated from their place. Just like the āwhat is locking this programā tools, where are the Windows functions for āaccessedā metadata info? If we take an interest in keeping an eye on programs that have access to our sensitive property (and by that, what would we even call āsensitiveā, when talking about things that belong to us? Do we let strangers sit in our living room?), we can see if programs are taking liberties on our computer and take it up with the company. And of course warn the world of what we find.
Wouldnāt it be nice to quickly see all the things you did recently? Text like notes and books, when did I last read that? A game, when did I last play that? A video, when did I last watch that? This info isnāt worth manually tracking but for it to be automatic would be helpful. But we canāt know any of this because we donāt know accessed by whom and how. The last time I read a particular book could have been last week but since the system read the file yesterday, the ādate accessedā says yesterday? Get out of here with that.
Proper accessed info not being standard practice on Windows is actually pretty gross.
Such deep monitoring actually sounds a bit scary. Thereās no doubt the CCP can do exactly that, but whether my OS needs to be equipped for that I have my doubts. Although I would like it if some app could tell me how much I have understood of the books Iāve read. Or maybe not⦠The risk of depression makes me hesitating a bit here.
Why does date accessed exist if we canāt use it?
I would like to hear even one testimony of someone who finds it useful, uses it on a regular basis, and how they use it. And how they know for sure the date they are looking at is what they think it is.
Date Modified too. We know what the term āmodifiedā means, but a simple an an optional expanded info block about this would make it more useful. What is the modification? Click to expand the date to the expanded version, to see what modified it. Some ideas:
Modified on (date + time) - user > file saved (overwritten) in program
Modified on (date + time) - user > metadata changed > Directory Opus 13
Modified on (date + time) - user > file copied
Modified on (date + time) - program > filed copied > (backup software name)