REQ: Create a Custom Field for a date ref (i.e. Yr, Mth, Day, etc.) from Modified Date

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Rambo
Posts: 7
Joined: 19 Nov 2013 15:08

REQ: Create a Custom Field for a date ref (i.e. Yr, Mth, Day, etc.) from Modified Date

Post by Rambo »

I've scoured the forums, but most of the answers that are likely what I need, are already in the middle of experienced users' conversations...
So, while I'm not new to programming logic or Javascript RegEx, and can write an Excel macro like a sunuvabitch, I'm stumped here, just starting to look at scripts or custom field functionality in XY.

Simple need at this time: I use XY mostly to Find Files; but what I want to add is a custom column with the Yr, Mth, or Day extracted from the file's Modified Date.
End result would be a list of files that can be sorted by the custom field.

Any help appreciated, even if just a pointer to a good resource... thx!

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

Re: REQ: Create a Custom Field for a date ref (i.e. Yr, Mth, Day, etc.) from Modified Date

Post by highend »

return formatdate(property("#date.m", <cc_item>), "yyyy");
One of my scripts helped you out? Please donate via Paypal

Rambo
Posts: 7
Joined: 19 Nov 2013 15:08

Re: REQ: Create a Custom Field for a date ref (i.e. Yr, Mth, Day, etc.) from Modified Date

Post by Rambo »

Perfect, thank you very much!!

Post Reply