Hi I am using calworkhours(start_datetime, end_datetime) function to

Hi

I am using calworkhours(start_datetime, end_datetime) function to get the workhours Number(Integer) between two datetime ( timestamps). It returns only the integer. but need the result to be with more precision - hours & minutes as decimal. for example 4 hrs 30 mts to be returned as 4.50. Is there any function in Appian to return work hours with the precision of minutes ( as decimal value)?

thanks
Jhothi

OriginalPostID-166654

OriginalPostID-166654

  Discussion posts and replies are publicly visible

Parents
  • @sivananthg: Hi, I too landed in this use case and the way I approached was by setting up a new table in the database and storing all working days for each month of the year. And then created a stored procedure function that takes your two date time time stamps and your business logic in that stored procedure function will return the work hours taking reference of working days setup in the table.
    And then call your stored procedure on Appian.
    The advantage of the above is that all this complex calculation can be avoided on Appian and thus doesn't hampers performance.
Reply
  • @sivananthg: Hi, I too landed in this use case and the way I approached was by setting up a new table in the database and storing all working days for each month of the year. And then created a stored procedure function that takes your two date time time stamps and your business logic in that stored procedure function will return the work hours taking reference of working days setup in the table.
    And then call your stored procedure on Appian.
    The advantage of the above is that all this complex calculation can be avoided on Appian and thus doesn't hampers performance.
Children
No Data