Is showing the time along with date a global setting?
Is showing the time along with date a global setting?
Not sure if I'm missing something here and it may be possible already but is showing the time along with date(created and modified) a global setting? Can I have folder view settings saved for some column layouts where I would like the time also along with the date and then some layouts where I only want the date displayed?
-
- Site Admin
- Posts: 63856
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Is showing the time along with date a global setting?
It's global per pane (Dual Pane). So no, you cannot control it per folder view settings.
FAQ | XY News RSS | XY Bluesky
Re: Is showing the time along with date a global setting?
But you are free to use scripted custom columns with date short for modified and created date and e.g. use the normal one as default.
This works for saved folder views as well...
This works for saved folder views as well...
One of my scripts helped you out? Please donate via Paypal
Re: Is showing the time along with date a global setting?
Okay, thanks.It's global per pane (Dual Pane). So no, you cannot control it per folder view settings.
If I were to do that, would it give me the same popup option like with Ctrl button down, right mouse down that is editable like the existing method of editing created and modified dates when selecting those fields? And then I imagine it would not effect this duration between created & modified date script right?But you are free to use scripted custom columns with date short for modified and created date and e.g. use the normal one as default.
This works for saved folder views as well...
return age(datediff(filetime(<cc_item>, "c"), filetime(<cc_item>, "d"), "ms"));
Re: Is showing the time along with date a global setting?
Don't know if it will work with ctrl + right click but e.g. this would work: Shift / Alt + Left clickWould it give me the same popup option like with Ctrl button down, right mouse down that is editable like the existing method of editing created and modified dates when selecting those fields?
This could popup any (self made) menu that you want, including touching & editing that displayed date
E.g. in the screenshot I left click a cc cell and display 2 menu items: See the changelog entries for:
Code: Select all
v26.50.0205 - 2024-10-28 15:25
v26.50.0204 - 2024-10-28 12:55
v26.50.0203 - 2024-10-27 16:38
It wouldn't, the script line derives info from the file / folder itself, not from something a cc showsAnd then I imagine it would not effect this duration between created & modified date script right?
One of my scripts helped you out? Please donate via Paypal
Re: Is showing the time along with date a global setting?
Yes, that left click example you've shown would work fine just like that and I don't imagine I would need anymore options to be displayed from those two touch & edit options. I would however need the short date and time displayed in the those two custom created & modified columns and I would just use the short date without the time for the default then. Date & time format in the custom columns ideally to appear this example: 2024-11-25 5:30 PM
Last edited by Schuller on 27 Nov 2024 12:42, edited 1 time in total.
Re: Is showing the time along with date a global setting?
You need to update to 26.70.0002 first!
Then add a new custom column for the modified date.
Use the script and see if you need to adapt the first
variable
3 spaces seems to be optimal here but it may differ on your system^^
Afterwards add your cc for the created date and use the same script again.
This time with your eventually modified
additional change is:
If you want to touch / edit a date, shift + left click into one of the cc's cells and choose a menu entry.
Editing a date is done in ISO 8601 format (yyyy-mm-dd hh:nn:ss), not the special one that is displayed in the column^^
Then add a new custom column for the modified date.
Use the script and see if you need to adapt the first
variable
$space
.3 spaces seems to be optimal here but it may differ on your system^^
Afterwards add your cc for the created date and use the same script again.
This time with your eventually modified
$space
value and the onlyadditional change is:
$typeDate = "c";
If you want to touch / edit a date, shift + left click into one of the cc's cells and choose a menu entry.
Editing a date is done in ISO 8601 format (yyyy-mm-dd hh:nn:ss), not the special one that is displayed in the column^^
Code: Select all
$space = " ";
$typeDate = "m"; // m = Modified, c = Created, lower-case!
$curDate = filetime(<cc_item>, $typeDate);
$newDate = $curDate;
if (<cc_trigger> == 5) { // Shift 4 + Left click 1
$typeString = ($typeDate == "m") ? "Modified" : "Created";
$menu = <<<>>>
Touch $typeString Date|t
Edit $typeString Date...|e
>>>;
$trimmed = regexreplace($menu, "^[ \t]+");
$selected = popupmenu($menu, 6:=<crlf>, 7:="|");
if ($selected == "t") {
setting "AllowRecursion", 2;
timestamp $typeDate, , <cc_item>;
} elseif ($selected == "e") {
$input = input("Edit date", , $curDate, "e", $curDate);
if ($input != $curDate) {
if (regexmatches($input, "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$")) {
$newDate = $input;
setting "AllowRecursion", 2;
timestamp $typeDate, $newDate, <cc_item>;
}
}
}
}
return ConvertTo12($newDate, $space);
function ConvertTo12($date, , $space=" ") {
// 2024-11.25 13:04:12
// 00:00:00 = 12 AM
// 12:00:00 = 12 PM
$time = gettoken($date, 2, " ", "t");
$date = gettoken($date, 1, " ", "t");
$date = gettoken($date, 2, "-", , 1) . "." . gettoken($date, 3, "-");
$hours = gettoken($time, 1, ":");
$mins = gettoken($time, 2, ":");
if ($hours >= 0 && $hours <= 11) {
if ($hours == 0) { return $date . " 12:" . $mins . " AM"; }
$hours = trim($hours, "0", "L");
$space = (strlen($hours) == 1) ? $space : " ";
return $date . $space . $hours . ":" . $mins . " AM";
} else {
if ($hours == 12) { return $date . " 12:" . $mins . " PM"; }
$hours = trim($hours, "0", "L") - 12;
$space = (strlen($hours) == 1) ? $space : " ";
return $date . $space . $hours . ":" . $mins . " PM";
}
}
One of my scripts helped you out? Please donate via Paypal
Re: Is showing the time along with date a global setting?
I just updated to the latest beta now which is 26.70.0003 and I am not sure now if that was why this is not entirely working.
The script is working to get the date and time, however, I'm not getting the ability to show the popup box when I shift+left click.
Also, perusing the forum more last night, I discovered this to simply return the time only from the created date into a custom column, which I never thought of at first, but may be a workable solution.
What else could be the cause of that popup to not show up? Could it be that particular update that is newer than the one you were referring too?
The script is working to get the date and time, however, I'm not getting the ability to show the popup box when I shift+left click.
Also, perusing the forum more last night, I discovered this to simply return the time only from the created date into a custom column, which I never thought of at first, but may be a workable solution.
So now I get the time in a separate column when I need the time option and can use the created date to for edits. Regardless, I think I would like to get this script working for me still so I can also have that option also to include all the date & time info displayed in one cell that is editable.return formatdate(property("#date.c", <cc_item>), "hh:nn am/pm");
What else could be the cause of that popup to not show up? Could it be that particular update that is newer than the one you were referring too?
Re: Is showing the time along with date a global setting?
26.70.0003 works fine here with the "context menu" of a cell.
Try different values if you like:
Try different values if you like:
So e.g. alt + left click would be a 33v26.50.0204 - 2024-10-28 12:55
+ Custom Columns: <cc_trigger> now also returns the state of the three function keys:
Shift = 4
Ctrl = 8
Alt = 32
So, for example, a value of 5 derives from 1 + 4 (Shift+LeftClick); a value of 13
derives from 1 + 4 + 8 (Ctrl+Shift+LeftClick).
This gives you even more control over Custom Column Cell Click scripts.
One of my scripts helped you out? Please donate via Paypal
Re: Is showing the time along with date a global setting?
Okay, I found the problem. I had to turn off Full Row Select in Tools, Customize List, and now the popup option appears with Shift+Left click.
Can this work with Full Row Select enabled too like how the editing the Created and Modified dates still work with Full Row Select. I'd be leaning into my monitor more and probably squinting more without Full Row Select.
Can this work with Full Row Select enabled too like how the editing the Created and Modified dates still work with Full Row Select. I'd be leaning into my monitor more and probably squinting more without Full Row Select.
Re: Is showing the time along with date a global setting?
As long as Don doesn't implement right + middle click for this <trigger> the only option would be to disable full row select and maybe go with:
Configuration | General | Menus, Mouse, Usability | Mouse | [x] Full name column select
Would be better than nothing...
Configuration | General | Menus, Mouse, Usability | Mouse | [x] Full name column select
Would be better than nothing...
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 63856
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Is showing the time along with date a global setting?
Yes, I see nothing better.
FAQ | XY News RSS | XY Bluesky