Job Runner

Round Up Time

Overview

Round the time up to the specified number of minutes. The calculation result can be referred to in other Actions.

Usage

When you execute an Action set to run “Round UpTime,” the result of that calculation is stored internally. You can calculate the time using a formula, such as “=$1.”

If the value of the Time parameter is in a format that does not contain a date, the result of the calculation is formatted like 09:30. Seconds are not included. You can set it straight into the Kintone Time field. However, the saved data does not contain a date, so it cannot be exported to a “Date and time” field in Kintone.

If the Time parameter value includes a date, it is calculated inclusively, and the result is also included in a date format. The resulting format will be based on Coordinated Universal Time, such as 2019-09-06T03:16:00.000Z. This format can be set directly into the Kintone “Date and time” field.

Example: Re-using the calculated date in an Action that runs the Do “Add New Record.”

  1. Set an Action that runs the Do “Round Up Time.” Assume that the Action Number is “1.”
  2. Next, open the “Mapping” menu of “Add New Record”, find the “Time” field that should receive the calculated time and enter the formula “=$1.” (If the Action Number of “Round Up Time” is “2”, change the formula to “=$2”.)

Parameters

Set the Time and Round Up Minute.

Time

Enter the time to be used in the date calculation.

The format can be time only and no date, such as 09:30, or both date and time, such as 2019-09-12 09:30.

If specified in a format that includes dates, it is calculated inclusively. For example, if you round up 2019-09-12 23:30 to the nearest 60 minutes, you get 2019-09-13 00:00.

If you want to access the value of a “Date” field or a “Date and time” field, input the field code as shown in the example below:

=Time_2

Remember to use an equals sign (=) before the field code to access the value of that field.

Use the syntax below if you want to use the current time.

=now()

This will set the current time as the value of this parameter.

Values that cannot be interpreted as empty values or dates cause an error at runtime.

Round Up Minute

Specify the round-up unit in minutes.

You must specify a number that divides 24 hours (1440 minutes). For example, 10, 15, 30 can be selected.

Values greater than 1 hour, such as 60 or 120 minutes, can also be specified. When rounding up to a unit of more than 60 minutes, the result will vary depending on the user’s time zone setting. For example, if the user’s time zone is set to JST, rounding up will be based on Japan time.

Negative values are not allowed.

An expression cannot specify it.

Precautions

  • For formats that do not contain dates, the result is between 00:00 and 23:59. For example, if you round up 23:30 by 60 minutes, the result is 00:00 instead of 24:00.

  • Even if the time parameter contains seconds in a format that does not contain dates, the calculation results do not include seconds. For example, if you round up 08:30:15 by 30 minutes, the 15-second part is ignored, so instead of 09:00:00, it will be 08:30.

Restrictions

  • You cannot use expressions for Round Up Minute.