Created
September 7, 2016 07:59
-
-
Save davidjturnbull/e69244774c22dfa40c2a55f8a9bbf719 to your computer and use it in GitHub Desktop.
Zapier code - Convert Resource Guru booking 'duration' value into seperate 'hours' and 'minutes' values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
duration = int(input['duration']) | |
# calculate the hours | |
divided_hours = duration / 60 | |
# calculate the minutes remaining | |
minutes_remaining = duration % 60 | |
return {'hours': divided_hours, 'minutes' : minutes_remaining } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment