Age in days instead of years

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Age in days instead of years

Post by Bart »

Is the a way to show the Age in the file explorer in days instead of years (or even months) when the age is more than a year. I have been looking around but could bot find.

Bart
Highend outside this forum

highend
Posts: 15003
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Age in days instead of years

Post by highend »

Maybe a custom column?

E.g. for the created date:

Code: Select all

    $diffH = datediff(property("#date.c", <cc_item>), , "h");
    return regexreplace($diffH / 24, "[.,]\d+$") . " day(s)";
One of my scripts helped you out? Please donate via Paypal

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Age in days instead of years

Post by Bart »

Thank you. How to assign this code, I am a newby here.

Bart
Highend outside this forum

highend
Posts: 15003
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Age in days instead of years

Post by highend »

- Right click in the column header, "Add column" (or: Menu - View - Columns - Add Column)
- Right click the newly added column header (current name: "(Undefined)"), "Select Custom Column..."
- Choose an entry of the list (one of the "(Undefined)" entries), click "OK"
- Right click the newly added column header (current name is still: "(Undefined)"), "Configure Custom Column <xx>..."

Caption: e.g.: "Age in days"
Type: Script
Format: Text or Text Right-Aligned
Trigger: Browse or List (depending on speed)
One of my scripts helped you out? Please donate via Paypal

Bart
Posts: 96
Joined: 05 Feb 2017 14:29

Re: Age in days instead of years

Post by Bart »

Thanks! It works well.
Let me explore the other settings in this field.

Bart
Highend outside this forum

Post Reply