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

how can I insert the current date

How can I insert the current date in a numbers document withe the "new numbers"? In the old numbers it was very simple but "insert date & time seems to be gone. This also seems to be true of "the new pages".

Posted on Jan 11, 2014 12:18 PM

Reply
Question marked as Best reply

Posted on Jan 11, 2014 12:43 PM

You can use a function to do it. Enter "=NOW()" into the cell which will insert the date & time. You can then format it as a date field to your preference.

7 replies

Jan 11, 2014 3:23 PM in response to cljlk2

If you are inserting the current date a lot, here is an easy way to add back this convenient functionality to your menu.


This requires the one-time setup of an "Automator service" that takes a few minutes. It's much easier than it sounds. Once it's set up, all you have to do to insert the current date is pick from the menu similar what you did in the old Numbers. Or, even better, use a keyboard shortcut.


1. Open Automator (in your applications folder) and choose Service as document type:


User uploaded file



2. Drag 'Run AppleScript' action from the left over into the right pane:


User uploaded file



3. Copy the following script and paste it into the right pane (replacing all of the default text in the pane):


on run

set date_ to ((current date) as string)


set the clipboard to the date_

tell application "Numbers"


activate

tell application "System Events"


keystroke "v" using {option down, shift down, command down}

end tell

end tell

end run



4. At the top of the right pane choose 'no input' for 'Service receives' and 'Numbers.app' for 'in'. (On my machine I have the old Numbers renamed to Numbers09 so the script doesn't get confused).


After you click the hammer icon (to "compile") your right panel should now look like this:

User uploaded file


5. Name the service "Today" or similar and move it to the Library > Services folder. I did this by File > Export in Automator and choosing the 'Desktop' for 'Where'. Then in Finder I opened a new window and held down the option key and chose Go > Library > Services. Then I dragged Today.workflow from the Desktop into that folder.


That's it. The service is ready to go. Thereafter, whenever you want to insert the current date, just pick Today from the Services menu:


User uploaded file


6. Or, to make this even easier to access, choose Services Preferences and assign a keyboard shortcut to the service:


User uploaded file


A similar Today function appears in Numbers for iOS after tapping day or year in the date picker.


SG



Troubleshooting notes:


This should "just work." But if it doesn't, try one or more of the following:

- Rename the old Numbers (the one in the iWork '09 folder under Applications) to Numbers09 or similar.

- Check to make sure you aren't using the same keyboard shortcut for something else.

- Remove 'Day of the week' from your "Full" date format in System Preferences > Language & Region.

- Try revising permissions under System Preferences > Security & Privacy > Accessibility > Privacy.





Jan 11, 2014 6:35 PM in response to SGIII

SG,


Thanks for posting the script and instructions.


I gave it a try, except for the assignment of a shortcut. Still thinking about whether I want to do that. Here are my observations:


You can Compile not only by hitting the Tool icon, but also by clicking the Run button, if you wish. If you like to test things as you go, this will save a step. This is not news to you or other old timers with Automator or AppleScript, but to someone trying this for the first time, it may be.


When you Save your Automator script, it will automatically go into your User/Library/Services - at least mine did. I did not need to Export and Move the file.


I didn't want to change the name of either version of Numbers, so I tested to see what interferences there might be. If you only have one version of Numbers running, that's the one that will be affected by the Service/Automator script. If you have both versions of Numbers running at the same time, Numbers Version 2 is the one that will be affected, regardless of which version's Service menu you accessed. So, if you want to use this action in Version three, either do the name changing, or make sure you have Quit Numbers V2.


Lastly, Date inserted by this script is Date and Time, like the NOW function in Numbers, not like the TODAY function. Used with a Shortcut, this will be fantastic for those who might want to use Numbers like a stopwatch lap timer. This is something equally valuable in either version. On the other hand, we don't always want the time portion of Date/Time, so be aware that you may have to deal with that.


Thanks again,


Jerry

Jan 11, 2014 7:28 PM in response to Jerrold Green1

Hi Jerry,


Thanks for the helpful comments.

When you Save your Automator script, it will automatically go into your User/Library/Services - at least mine did.


Automator Services on my machine used to save automatically to my User/Library/Services just as you describe. But for some reason they will now save only in iCloud; hence the extra step of exporting and moving to the Library. Some other users report describe similar behavior and a slightly different workaround here. It's good to hear this isn't necessary for everyone.


So, if you want to use this action in Version three, either do the name changing, or make sure you have Quit Numbers V2.


Thanks for clarification on that.


Lastly, Date inserted by this script is Date and Time, like the NOW function in Numbers, not like the TODAY function.


Right you are. This should perhaps have been named NOW. To get a true TODAY function equivalent (i.e., without the Time), this line in the script:


set date_ to ((current date) as string)


Needs to be changed to this:


set date_ to date string of (current date)


Anyone needing to insert date formats different from the "Full" format as set in System Preferences >

Language & Region can consult this page for fairly easy ways to control the date (and time) format with AppleScript.


SG

Oct 6, 2015 3:04 PM in response to SGIII

I this is exactly what I'm looking to accomplish.

I have read over your instructions and Jerry's additions and although I'm not a programmer I should be able to execute this.


But for some reason it's not working for me. I get no results using either the Shortcut from the Services Dropdown or the keystroke. I have used the code you provided as well as changing the selected "v" to "d" thinking I might have a conflict with the key combination. I also compiled using the run command as there isn't a hammer icon on my version of Automator.

I also tried the updated output syntax you provided because that's the format I ultimately want.


Can you think of any additional reasons this would not produce a date for me using Numbers 3.5.2?


Thanks,

Johnny~

Oct 6, 2015 6:51 PM in response to JohnnySouth

On the chance that something has gone wrong in creating the service itself, try downloading a ready made one from this link (Dropbox download).


To install, double-click the downloaded .workflow package and, if necessary, click "Install Anyway" in System Preferences > Security & Privacy.


Also, double-check that Automator is enabled (the checkbox is checked) here:


User uploaded file




SG

how can I insert the current date

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