Question
2
Replies
405
Views
Foray Software Pvt Ltd
Posted: February 23, 2018
Last activity: February 26, 2018
Closed
Round off Days using function
Hello Everyone,
I have a Requirement for Round function. Note: < 15 days = no roundoff
>15 days = roundoff to next month (added 1month
Like if it is 1 year 10 days we need to display 1 year only
and if it 1 year 16 days we need to display 1 year 1month
So 1 year 2 months 16 days should be round off to 1 year 3 months like this....
Can someone please help.
Thanks
Venkat
Hi Venkata krishna,
Can you please let us know, how is your input going to be like ?
Is it going to be a 3 combination strings like :
Input --1
Years : 4 Months : 6 Days : 7
Expected Output : will be updating the months string to 6 and days string to 0 ?
Input --2
Years : 4 Months : 6 Days : 17
Expected Output : will be updating the months string to 7 and days string to 0 ?
Is this what you want ?
Please let me know if my understanding is correct.
We can surely achieve this using an activity, where we can check the days count by parsing the days string and then set the days to 0, incrementing or decrementing the months using a condition on days count and then evaluate the year too (if incase the month is already 12 and the days is > 15, year has to be increased).
Thanks,
Sai