Calculate the age based on the Date field and set it to another field.
To set the calculated age value, prepare the appropriate field in the Kintone app and select it in the “Age Field” parameter.
To modify the formatting of the calculated age so that it displays as “X years old” rather than just a number, follow these steps:
= $1 & "years old"
Set Birthday, Reference Date, and Age Field.
Select a “Date” field or “Date and time” field containing the birthday to be used in the calculation.
If you select a “Date and time” field, the time will not be considered in the calculation.
If you select a field that is inside a table, the Do will process all rows of that table. See *1 for exceptions to this behavior.
*: If you set a Condition that only applies to some table rows (such as the Condition “When Fields Value Changed”), the Do will only process the rows affected by that Condition.
Specify at what point in time to calculate the age.
This field is optional. If you choose not to provide it, the age will be calculated based on the date when the action is performed. The date when the action is performed is based on the “Time Zone” in the user’s Kintone profile settings. When the timezone is set to “(UTC+09:00) Osaka, Sapporo, Tokyo,” it is referred to as Japan Standard Time (JST).
To take the reference date from the field value, use an expression. In the following example, the value of the field code “date_2” is used as the reference date.
= Date_2
You can also specify the results of actions that calculate dates. For example, if you want to use the result of “Get Specific Date” as the reference date, and that action is number one, you can specify it as follows.
= $1
Use this parameter to select the field that should receive the calculated value. This parameter is optional.
This parameter accepts the following field types:
If this parameter is left empty, the calculated age will not be assigned to any field. However, other Actions will still be able to access the calculated age value.
When selecting a field in the table for “Birthday”, it is also necessary to select a field for “Age Field” from the same table.
This action is designed to work seamlessly with krewSheet.
However, the following restrictions apply to the parameter “Age Field”: