I have one block called claim list in which i am fetching data from database. And showing that data in the table. In that i have one column called CreatedOn which is of Date type. I want to calculate CreatedOn-Currdate (Without satuday and sunday). For Example : CreatedOn =2024-11-05 & CurrDate =2024-11-11 so on 9th and 10th nov we have saturday and sunday so i want to display calculate age as: 4If anyone is able to use onAfter fetch on the attribute then it will solve my another problem also.
Hi @Vinay Bhirud ,
Please take a look at these discussions.,
DiffDays without weekend days
DiffDays without weekend days and national holidays
working days of the current month.
Hope it help you.
Thanks
Kundan Chauhan
Can anyone send me oml file with this logic. It will help me to integrate that functionality.Thank you
Hi @Vinay Bhirud,
I hope you are doing well.
Below is the oml file for your problem, you can take the reference from. I hope it helps.
Regards,
Ojasvi Sharma
Hi Vinay Bhirud,
I have included the OML with the updates, please check.
Demo url -
https://vyadav.outsystemscloud.com/AgeWithoutSatudayAndSunday/AgeWithoutSatudayAndSunday
Hello @Vinay Bhirud
You can use this js code to archive this you only need to pass them from date and to date
This function calculates the age between two dates, excluding Saturdays and Sundays, and returns the result in years, months, and days based on weekdays only.
Parameters:
Added OML you can check for your reference
Regards Gourav Shrivastava