I need an action in automator that will derive military time and paste it into the clipboard. I have been trying to figure this out for awhile. Any help out there?
Hi,
Add an Applescript action to your Automator workflow and add in the following line:
set the clipboard to (do shell script "date '+%H:%M'")
The action should look something like this:
on run {input, parameters}
set the clipboard to (do shell script "date '+%H:%M'")
return input
end run
Best wishes
John M
There even is a “Run Shell Script”- and “Copy to Clipboard”-action
Hey, thanks guys this worked great! I found out for myself how to add on a “seconds” column onto the date string.
Just one more question from a noob. Is there any way I can add on two more digits at the end of this string to represent fractions of a second? I need it for video which has 30 frames/second. It would be great if I could get this script to output a time like this as follows:
13:53:14:10
Which translates to one o’clock (military time) : fifty three minutes : fourteen seconds and :ten frames.
Thanks again for the help!
I visited your web site, very cool! You are doing really cool stuff, keep up the great work!
Thanks again,
Roger