using Numbers, I need to time-stamp each line in a table for when it was entered

Did everything as per this

https://discussions.apple.com/thread/3734500?answerId=30352342022#30352342022


All good until I run it and gives an error


The action “Run AppleScript” encountered an error: “Numbers got an error: Can’t set document 1 to "Friday, 18 January 2019 at 11:53:06 am".”


CAN ANYBODY HELP PLZ,THANX IN ADVANCE

MacBook Air (2018 or later)

Posted on Jan 17, 2019 4:54 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 17, 2019 6:41 PM

I suggest using the last script in that thread in your Automator Service. It looks as if you may have used the one in the middle.


Note that in recent versions of Numbers you don't necessarily have to use an Automator Service. You can click twice in a cell (so that the cursor is flashing inside it) and in your menu choose Insert > Date & Time. You should be able to assign a keyboard shortcut to that menu pick if you want.


An Automator Service allows you to click only once. It can also be modified to give you a particular date-time format. Post if you need that.


SG



11 replies
Question marked as Top-ranking reply

Jan 17, 2019 6:41 PM in response to BenSingh

I suggest using the last script in that thread in your Automator Service. It looks as if you may have used the one in the middle.


Note that in recent versions of Numbers you don't necessarily have to use an Automator Service. You can click twice in a cell (so that the cursor is flashing inside it) and in your menu choose Insert > Date & Time. You should be able to assign a keyboard shortcut to that menu pick if you want.


An Automator Service allows you to click only once. It can also be modified to give you a particular date-time format. Post if you need that.


SG



Jan 18, 2019 7:51 AM in response to BenSingh

This Time Stamp Automator Service (Dropbox download) will place the current date-time in a cell when you hit a keyboard shortcut.


To install double-click the downloaded .workflow package and if necessary give permission at System Preferences > Security & Privacy. Also make sure Automator.app and Numbers.app are listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility.


Time Stamp should now be listed in your Numbers > Services menu.


To attach a keyboard shortcut go to System Preferences > Keyboard > Shortcuts > Services. Scroll down in the right panel until you see Time Stamp. Double-click on the 'none' next to it and enter your shortcut (shift-command-T works well on my machine).


This installation and setup should take a minute or so.


Thereafter, to put a timestamp in a Numbers cell all you have to do is place the cursor in the cell and type shift-command-T (or whatever shortcut works for you). The result will appear however you have formatted that cell. You can display Fri, 18 Jan 2019 3:37 pm or whatever format you want that is valid in your region. You choose the format from the dropdown in the Data Format section of the Cell tab in Format panel at the right.


This may be a "workaround" but it takes fewer keystrokes than other workarounds (such as copying and pasting from a cell with NOW) and is just as efficient as the built-in ctrl-shift-; timestamp shortcut in Excel.


The simple AppleScript within the Automator Service can be viewed by holding down the option key in Finder and (in the menu) Go > Library > Services and double-clicking Time Stamp.workflow. The script is repeated below.


SG



on run {input, parameters}
	set cd to (current date)
	set the clipboard to cd's date string & " " & cd's time string
	tell application "Numbers" to activate
	tell application "System Events"
		keystroke "v" using {option down, shift down, command down}
	end tell
end run


Jan 18, 2019 6:08 AM in response to BenSingh

Ben,


Numbers does not have a Timestamp feature. Every other option is a work around. I propose, and prefer, to use a cell with the formula "=now()", then, when you need a timestamp, select the cell, copy then select the destination cell and use the key combination: <command>+<shift>+v to paste the formula result


the operations are:

mouse to source cell, single click

<command>+c

mouse to destination, single click

<command>+<shift>+v



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

using Numbers, I need to time-stamp each line in a table for when it was entered

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