Bitrix24 Community

Support » Forum » Bitrix24 general questions » Using formula in Business Process: How to...?
Pages: 1
RSS
Using formula in Business Process: How to...?
Hi all,

I made 3 parameters (workingfrom, workingto and totalday). When I input the data of parameters (workingfrom and workingto) for working away from day 05/20/2015 to day 05/25/2015 (So I have 6 days for working away). Now I want the system automatically calculate the total number of days.

How can I do that? I'm so confuses in this requested.
Please help!

Thank you all,
Hello khanh nguyen,

Please use the datediff function to calculate the difference between two dates.
Dear Ann,

=datediff({=Variable:Variable1}, {=Variable:Variable2},'%m month, %d days'')

I don't get it... What should be the field type of the two variables and the type of the field in which I should store the result of the formula? I thought it would be, respectively, date and integer/number, but this does not seem to work (if the variables are dates, they can't be used in a formula to be stored in an integer/number type of field).
The function gets the date/time type and returns string.
Thanks, but I still can;t get it to work... If I write the above function in a string-type field, it returns something like this:


=datediff(20.05.2015 22:33:00, 03.06.2015,'%m month, %d days'')
Please remove the odd apostrophe:

=datediff(20.05.2015 22:33:00, 03.06.2015,'%m month, %d days'')

and try if it works.

If it still doesn't work, please contact our Helpdesk.
Hi Ann,

Me too.

That's my results: =datediff(06/05/2015, 06/12/2015,'%d days')

Please help me, Ann!
Thanks
Hi NAHI!

Please contact our Helpdesk. Thank you.

Best,

Yana.
Pages: 1
2,000,000+
organizations
are already using Bitrix24