Convert timecode to total seconds

Function for taking timecodes like 01:45:30 and adding up the hours or minutes or seconds into a single unit (seconds) that can be used for calculations; or, more specifically, YouTube timestamps.

Actions Used

Split Text
Separates text passed into the action into a list.
Counts the number of items, characters, words, sentences, or lines passed as input.

Note (from Apple, for real)
This is just like the Count in Sesame Street, but instead of a vampire, it’s a Shortcuts action.
Tests if a condition is true, and if so, runs the actions inside. Otherwise, the actions under “Otherwise” are run.
Get Item from List
Returns one or more items from the list passed as input. You can get the first item, the last item, a random item, the item at a particular index, or items in a range of indexes.
Set Variable
Sets the value of the specified variable to the input of this action.

Extra Details

Run Shortcut deep link
Open Shortcut deep link
AppleScript code
tell application “Shortcuts Events” run shortcut “Convert timecode to total seconds” end tell

More From This Folder

More From The Library

Get way deeper into Shortcuts – become a member.