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

How do I insert today's date in a cell on Numbers 3.0?

Hello there,


Numbers used to have a item on Inset menu that would insert today's date in a cell in a couple clicks.


Does anybody knows the new pathway to get that done?



Alex

iMac, OS X Mavericks (10.9)

Posted on Oct 26, 2013 3:53 AM

Reply
Question marked as Best reply

Posted on Oct 26, 2013 4:52 AM

Hey Alex, I checked all the menu items, and I couldn't find it anywhere myself, so I just tried something that seemed logical to me.


1. select the cell you want the date

2. type in "=" then "Today"


and it Worked!


I also tried =Date, it gives options for month, year, day. but couldn't figure that one out.

39 replies
Question marked as Best reply

Oct 26, 2013 4:52 AM in response to alexhax

Hey Alex, I checked all the menu items, and I couldn't find it anywhere myself, so I just tried something that seemed logical to me.


1. select the cell you want the date

2. type in "=" then "Today"


and it Worked!


I also tried =Date, it gives options for month, year, day. but couldn't figure that one out.

Oct 26, 2013 6:16 AM in response to alexhax

Hi Alex,


This thread seems to be a duplicate but I'll post here too a method that can save time for people entering lots of dates. After the one-time setup, this is just a menu pick or keyboard shortcut.


If you often enter dates here is a way that can save you some time.


(This is a one-time setup. Using it thereafter is just a menu pick or keyboard shortcut.)


Open Automator (in your applications folder) and choose Service as document type;


User uploaded file



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


User uploaded file



Copy this script and paste it into the right pane (replacing what's there):


on run

set date_ to ((current date) as string)


set the clipboard to the date_

end run



After clicking the hammer, the right pane should now look like this:


User uploaded file


Save the Automator Service as "Get Date" or whatever you want to call it.


You only need to do these setup steps steps ONCE.


Now, whenever you need to input the date, just choose Get Date in the Numbers Services menu.


User uploaded file


And paste into the cell where you need it with command-v.


If you don't like the services menu you can also assign Get Date to a keyboard shortcut, so you would type your keyboard shortcut followed by command-v.


SG

Oct 26, 2013 6:34 AM in response to alexhax

I did your steps until saving the Automator Service


Hi Alex,


When you say "until saving" do you mean you haven't saved it yet?


After saving it should appear automatically in the Services menu. I didn't need to log out or restart on my machine.


Let me know what you're seeing on your end after saving.


SG

Oct 26, 2013 7:51 AM in response to SGIII

Hey SGIII,


that's a great solution, and works for me, I just added a few lines to your applescript, to save the pasting step.


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 {command down}

end tell

end tell

end run


then I assigned a keyboard shortcut to the Service, via system preferences > Keyboard > Shortcuts,


So now I can just select the cell, do the shortcut , and my current date appears.


only one more thing I have to figure out, when using the service, it gets rid of my text styling for that cell.

Oct 26, 2013 8:13 AM in response to alexhax

Glad it worked on your end!


In case you want to add a keyboard shortcut you would go to System Preferences>Keyboard>Shortcuts, scroll down to find the Automator Service you just created ('Get Date' in my case, 'Today; in alexhax's), check the box and assign a keystroke combination that isn't already used.


User uploaded file


@slypix


Like you I was hoping for the extra automation you have but, alas, Numbers 3.0 isn't in the AppleScript dictionary on my machine and thus won't respond to AppleScript. Your script is probably working with Numbers '09 which is still on your machine (unless you deleted it for some reason or you have a brand new Mac). Of course in Numbers '09 you don't need the script because you already have the built-in menu pick. If they bring in support for Numbers 3 your additions will be useful, though. Let's hope they do.


Give them feedback!


User uploaded file


SG

Oct 26, 2013 8:25 AM in response to SGIII

I don't have Numbers 09, I did a clean install of Mavericks, and downloaded the latest Numbers from the AppStore, running on an old reliable "early 2008 MBP".


I just followed your instructions to create a service with automator, and googled how to add a paste function in applescript, then added those lines to your instructions.


and everything worked out of the box. no extra libraries or helpers.

Oct 26, 2013 8:33 AM in response to slypix

only one more thing I have to figure out, when using the service, it gets rid of my text styling for that cell.


To do that I think you want Paste and Match Style. If your script is working with Numbers 3.0 it would be:


keystroke "v" using {option shift command down}


I think I got that right. Anyway the equivalent of this:


User uploaded file

SG

Oct 26, 2013 8:42 AM in response to slypix

I don't have Numbers 09, I did a clean install of Mavericks, and downloaded the latest Numbers from the AppStore, running on an old reliable "early 2008 MBP".


That's very interesting news indeed! Many of have been assuming there is no support for AppleScript in Numbers 3.0 because it doesn't show up in the AppleScript dictionary and doesn't respond to scripts, whereas Numbers '09 still does. When you open the dictionary in AppleScript Editor:


User uploaded file


And click on Numbers.app in the list of apps, do you see stuff like this?


User uploaded file


If you do, that will make my day!


SG

Oct 26, 2013 9:34 AM in response to SGIII

Ok, here's an improved Automator Service that has the same functionality as Insert Date Date & Time in the old Numbers. It incorporates slypix's idea of eliminating need for manual command-v. And it preserves the original cell formatting.


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 {shift down, option down, command down}

end tell

end tell

end run



In Automator it looks like this (note that it's set to receive no input).


User uploaded file


On my machine I have the old Numbers renamed to Number09 so the service doesn't get confused.


Numbers 3.0 doesn't appear in the AppleScript dictionary on my machine. But it will respond to the activate command. And presumably some simple GUI scripting is possible, as with other Mac applications.


SG

How do I insert today's date in a cell on Numbers 3.0?

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