Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
6 replies
Subscribers
8 subscribers
Views
2524 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Any way to change the format of the duration to something easier for calculation
mathieud
over 8 years ago
Any way to change the format of the duration to something easier for calculations? (i.e. seconds)
OriginalPostID-223337
OriginalPostID-223337
Discussion posts and replies are publicly visible
0
chetany
A Score Level 1
over 8 years ago
= hour(process_duration())*60*60 + minute(process_duration()) * 60 + second(process_duration()) will convert the duration to seconds
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
Change the Process Duration column with the above expression rule definition in the report, then save the report.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sanjeevg
over 8 years ago
Expression provided by Chetan is good, one thing is missing days to seconds conversion, I modified his expression to add day to seconds conversion - =tointeger(process_duration())*60*60*24 + hour(process_duration())*60*60 + minute(process_duration()) * 60 + second(process_duration())
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
In addition to the previous comments, it might be useful to create an external expression rule that will take the time value and return the number of seconds, which could be used elsewhere and also debugged without needing to edit the process report multiple times. Note that when calling an expression rule from the process report definition field, the system seems to dislike when the rule contains functions that use dictionary syntax, so keep that in mind while designing if you take this approach.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
@Sanjeev, thank you for correcting. @mschmitt, yes it is good to create an external rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mathieud
over 8 years ago
Thank you everyone!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel