Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Date and Time Shortcuts No Longer Available in Catalina

Hi,


It seems the “Long Date”, “Long Date & Time”, “Short Date”, “Short Date & Time” or “Time” shortcuts that were available up through 10.14 are not available in 10.15.


Am I missing something?


Did they move to a different form?


This webpage describes how to use them a while ago:


http://www.mactricksandtips.com/2012/04/insert-the-date-and-time-with-a-keyboard-shortcut.html


I tried to use Automator to recreate the function, but there are issues with privacy within system preferences.


Thanks, Gerhard

MacBook Pro 13", macOS 10.12

Posted on Dec 2, 2019 3:30 PM

Reply
Question marked as Best reply

Posted on Dec 10, 2019 1:11 PM

I missed this, but you need to check Output Replaces selected text at the top of the workflow, and resave it. There won't be any selected text, so it outputs the result of your script wherever there is a text field selected — even here.


There is no need to toss anything onto the clipboard once the first paragraph is handled.

Similar questions

12 replies
Question marked as Best reply

Dec 10, 2019 1:11 PM in response to gschoenthal

I missed this, but you need to check Output Replaces selected text at the top of the workflow, and resave it. There won't be any selected text, so it outputs the result of your script wherever there is a text field selected — even here.


There is no need to toss anything onto the clipboard once the first paragraph is handled.

Dec 5, 2019 11:33 AM in response to gschoenthal

Hey there gschoenthal,


Thanks for reaching out to Apple Support Communities. I understand you’re not able to use a specific shortcut after updating your Mac. I’ll be happy to help with this.


I’m not seeing this listed as a built-in shortcut of Mac keyboard shortcuts. You can review this list here:


Mac keyboard shortcuts


I understand you attempted to use Automator to create a way of doing this. See if you can create a shortcut for this using the steps from this link:


Create keyboard shortcuts for apps on Mac


I hope that helps.

Dec 5, 2019 3:06 PM in response to gschoenthal

When you save a working Quick Action from Automator with a brief, unique name, you are done with the workflow.


The shortcut key is assigned in System Preferences : Keyboard : Shortcuts : Service panel. You will need to scroll down until you find the name that you assigned to the Service (Quick Action). On the right-side of your Service entry, you will see the faint word "none."


Click on "none" and it will change to Add Shortcut. Click again, and a text entry field will open. Enter the keyboard shortcut for your Quick Action, taking care to not use any reserved macOS Keyboard, or existing application menu shortcuts.


If you wrote your Automator Quick Action to use no input from any application, then any text area that you click on should be able to receive your formatted date string. You may have to do this from the application's Service menu just once — before your keyboard shortcut will work with the Quick Action shortcut that you assigned.

Dec 5, 2019 12:53 PM in response to VikingOSX

Hi,


Thanks for the comment. I was using the shortcuts that I referred to until I upgraded to Catalina. The article from 2012 is the only one that I found that referred to the feature.


I tried the following Automator Quick Action script, but I keep getting the following error when I try to run it.


on run {input, parameters}

set dateString to do shell script "date +'%m/%d/%Y'"

tell application "System Events"

keystroke dateString

end tell

return input

end run


The action “Run AppleScript” encountered an error: “System Events got an error: com.automator.runner.xpc is not allowed to send keystrokes.”


Also, when the script is run within Automator the following error is returned.


System Events got an error: Automator is not allowed to send keystrokes.

Dec 9, 2019 3:20 PM in response to VikingOSX

Apologies for the ongoing questions.


When I paste the following into the AppleScript window in the Automator program and then press run, there is nothing returned in the results box. I would expect to see the current date in a mm/dd/yyyy format.


on run {input, parameters}

return (do shell script "date +'%m/%d/%Y'")

end run


What I am doing wrong?

Dec 5, 2019 12:46 PM in response to gschoenthal

Post a link to an article from 2012 (Mountain Lion) seven years later and there is an excellent chance that Apple removed those date/time Service items long ago. These are not in El Capitan, so Apple removed them at some point between Fall 2012 and Fall 2015.


Always look for a date on an article that you reference because Apple is about change, not position, and seven year old links to articles can be absolutely useless when seeking removed features in a current operating system. Only Apple product teams know the reasoning behind any why question?


Of course, it is a simple matter to write your own Automator Quick Actions in Catalina that can return just about any Date/Time formatting you require, whether from a Run Shell Script (less code using UNIX date), to more code using a Run AppleScript action.

Dec 5, 2019 1:15 PM in response to gschoenthal

In Catalina, Apple is far more security conscious and you cannot send key codes, or key strokes using System Events from Automator. In Automator, the following two examples assume that Workflow receives no input in any application:


on run {input, parameters}
   set input to do shell script "date +'%m/%d/%Y'"
   return input
end run


or

on run {input, parameters}
   return (do shell script "date +'%m/%d/%Y'")
end run


or in a Run Shell Script action with a Bash shell and pass input: to stdin :


date +"%m/%d/%Y"


The Free BSD date format codes are shown in the online strftime man page. They are also available from the command-line in Terminal:


man -t strftime | open -f -a Preview


Dec 9, 2019 4:53 PM in response to gschoenthal

Any appilcation that offers text input, and shows your Quick Action (aka Service) on its application name : Services menu should receive that date stamp as text. If you run the Quick Action without pointer focus in an application's text input area, nothing will happen.


The very first time that you want to use the Quick Action, you should run it interactively from the given application's Service menu. The second time that you want to use it, try your keyboard shortcut — provided again that you have pointer focus withint a recipient text field of a given application. Some application's may rebuf your advances — LibreOffice Writer comes to mind, even with the mouse pointer clicked within a new word processing document. Not originally created using Apple's Cocoa development packages, but a translation from Qt.

Date and Time Shortcuts No Longer Available in Catalina

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.