1b.app
Link copied -

Is it possible to calculate the difference in product dates, that is, the current date (calculation date) and the date in the additional field

The purpose of the task is to take an additional field of the product (in which some date is written) and then calculate how many days have passed since today's date and then write it in the additional field
That is, for example, the date 03.01.2023 is saved in the additional field, and today is 03.03.2023, the number 2 should be found in the result.
In the automation, there is an action "Calculate the value according to the formula and write it in the specified field", but there is no "Current date" field.
Maybe there are some ways?
Original question is available on version: ua

Answers:

in subtraction only operation select
03.03.2023, 16:15
Original comment available on version: ru

Юля
менеджер
thanks for the answer
On your example, there is a calculation of process products
I need the calculation of the product fields, i.e. for the system to calculate by itself when saving the product (through automation) or once a day per kroner
Is there such a possibility, or is the calculation possible only in the process?
When trying to calculate the difference in dates (two additional fields with the date type) due to the action in product automation "Calculate values using a formula and write them in the specified field", the system issues an error saying that the values are incorrect.
03.03.2023, 16:37
Original comment available on version: ua

I misunderstood you, I thought that you want to calculate in the order.

Julia wrote:
In automation, there is no option "Search the value for the formula and record in the specified field" but the field "Current date" is not available.

There is a variable [cdate] but it will not give you anything, the dates are presented to the formula as strings - they cannot be "subtracted" from each other. This action can be modified so that it can read the difference of dates from additional fields or the difference from an additional field with the current date, this will take 1 hour of refinement. Refinement is possible only if you have os. Bill?
03.03.2023, 17:03
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment