Mike Outram Posted August 17, 2017 Share Posted August 17, 2017 Is there a workflow to convert a timestamp in HH MM SS to seconds only? Cheers! Link to comment
deanishe Posted August 17, 2017 Share Posted August 17, 2017 Moved to Workflow Help & Questions forum. Link to comment
vitor Posted August 17, 2017 Share Posted August 17, 2017 Something like this, in ruby: require 'time' t = Time.parse(ARGV[0]) puts(t.hour * 3600 + t.min * 60 + t.sec) Here’s a Workflow. Mike Outram 1 Link to comment
Mike Outram Posted August 17, 2017 Author Share Posted August 17, 2017 Hey, thanks Vitor! I'll give that a go Link to comment
dfay Posted August 18, 2017 Share Posted August 18, 2017 See also this which uses conversion to seconds as the basis for a time calculator Link to comment
Mike Outram Posted August 19, 2017 Author Share Posted August 19, 2017 (edited) On 17/08/2017 at 9:47 PM, vitor said: Something like this, in ruby: require 'time' t = Time.parse(ARGV[0]) puts(t.hour * 3600 + t.min * 60 + t.sec) Here’s a Workflow. Thanks again for that workflow, @vitor! Worked like a charm & saved me a bunch of time Mike Edited August 19, 2017 by Mike Outram vitor 1 Link to comment
alrowan Posted December 17, 2017 Share Posted December 17, 2017 Victor's link is broken. Link to comment
deanishe Posted December 17, 2017 Share Posted December 17, 2017 2 hours ago, alrowan said: Victor's link is broken. Fortunately, he also posted the code. Put that in a Run Script action with Language = /usr/bin/ruby Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now