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
Replies
6 replies
Subscribers
8 subscribers
Views
2388 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Has anyone been able to create caladdminutes function? Been searching in availab
Jess
over 9 years ago
Has anyone been able to create caladdminutes function? Been searching in available plugins but to no success..
OriginalPostID-150155
OriginalPostID-150155
Discussion posts and replies are publicly visible
0
mahipalc
over 9 years ago
hi jessicae,
Can you create a rule with below code:
=time(hour(ri!input)+floor((minute(ri!input)+ri!addMinutes)/60),mod((minute(ri!input) + ri!addMinutes),60)).
Here i/p's are
"input" of type time, "addMinutes" of type integer.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
If the use case is to add minutes to a given date or time, you just need to use tointervalds(hh,mm,ss). For example, to add 3 minutes:
pv!myDateTime + tointervalds(0,3,00)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
=pv!myDateTime + tointervalds(0,3,0)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sainadhn
over 9 years ago
Hi @jessicae,If your requirement is to find out the nearest business time (minutes) you can use below function.
caladdhours(now(),0,calendar).
in case this does not satisfy your requirement can you please elaborate the use case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jess
over 9 years ago
caladdhours is not accepting decimal values so it won't work in our scenario. let's say we need to add 1.5 hrs it will round off automatically, so we are looking for ways to use the same function as caladdhours (which calculates based on business hours) but input will be minutes (this is to solve the issue of 1.5hrs converting to 2hrs and make it 90minutes instead). We are using this for escalation.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sainadhn
over 9 years ago
I think this can be achieved by instead of providing the decimal value as input for caladdhours, can we add the minutes to date and time variable we are passing as first input.
For example i need to know next business hour after 90 minutes from now then
instead of caladdhours(now(),1.5,calendar) (as it will round off the dcimal to integer value)
we can pass caladdhours(now()+intervalds(0,30,0),1,calendar).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel