Hi all! Tell me how to add date + 1 month to the field1 and display this date in field2.
Announcement
Collapse
No announcement yet.
Add 1 month to date
Collapse
X
-
you can do it like below:
PHP Code:field2 = datetime\addMonths(field1, 1);
This will add a 1 month to field1 (which i assume is a date type) and will be stored in field2 which also needs to be date type.
read more here https://docs.espocrm.com/administrat...mula/datetime/Last edited by rabii; 12-11-2023, 12:59 PM.Rabii
Web Dev
- Likes 2
-
Besides what rabii advised for the second part of your question:
You can use field with Foreign type https://docs.espocrm.com/administration/fields/#foreign.
You can use Formula: field2 = field1;
You can use BPMN or Workflow, specifying the change of the field1 field in the Conditions, and assigning the value of the field1 field to the filed2 field in the Actions.Last edited by victor; 12-11-2023, 12:29 PM.
- Likes 2
Comment
Comment