Previous 1 2 3 Next 38 Replies Latest reply: May 16, 2015 7:23 AM by kulashnikov24 Branched to a new discussion.
alexhax Level 1 Level 1 (0 points)

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)
  • slypix Level 1 Level 1 (10 points)

    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.

  • Jerrold Green1 Level 7 Level 7 (29,935 points)

    Alex and Sly,

     

    I should warn you that if you that when you open that document tomorrow, the TODAY() function will show tomorrow's date, not the date when you first filled the cell.

     

    To solidify the date, Select the cell, type Command-C, Shift-Command-V

     

    Jerry

  • SGIII Level 5 Level 5 (5,750 points)

    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;

     

    service.png

     

     

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

     

    run-applescript.png

     

     

    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:

     

    script.png

     

    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.

     

    services-menu.png

     

    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

  • alexhax Level 1 Level 1 (0 points)

    Hi SGIII

     

    Thank you

    I do enter current dates allot.

     

    I did your steps until saving the Automator Service, I opened Numbers and tried the menu Numbers > Services but No Services Apply.

    Do I need to log out or restart?

  • SGIII Level 5 Level 5 (5,750 points)

    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

  • alexhax Level 1 Level 1 (0 points)

    I did command+S and Saved service as: Today

    I did restarted.

    I also made a Sortcut on Keybord System Preferences for the Service Today and tryed but nothing happened as well.

  • alexhax Level 1 Level 1 (0 points)

    Is there anything to do with these boxes?

    Screen Shot 2013-10-26 at 22.57.25 .png

  • SGIII Level 5 Level 5 (5,750 points)

    Change to 'no Input'. Forgot to mention that. May be the problem.

     

    Screen Shot 2013-10-26 at 10.01.25 AM.png

    Does it show up in the Services menu now?

     

    SG

  • alexhax Level 1 Level 1 (0 points)

    Perfect!

     

    Screen Shot 2013-10-26 at 23.07.20 .png

     

    It works.

     

     

    Thanks allot.

  • slypix Level 1 Level 1 (10 points)

    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.

  • SGIII Level 5 Level 5 (5,750 points)

    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.

     

    Screen Shot 2013-10-26 at 10.56.58 AM.png

     

    @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!

     

    numbers-feedback.png

     

    SG

  • slypix Level 1 Level 1 (10 points)

    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.

  • SGIII Level 5 Level 5 (5,750 points)

    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:

     

    Screen Shot 2013-10-26 at 11.29.43 AM.png

    SG

  • SGIII Level 5 Level 5 (5,750 points)

    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:

     

    Screen Shot 2013-10-26 at 11.38.33 AM.png

     

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

     

    Screen Shot 2013-10-26 at 11.40.43 AM.png

     

    If you do, that will make my day!

     

    SG

Previous 1 2 3 Next