Increases or decreases hour

Increases or decreases hour

Logic name

Increases or decreases hour

Function

This logic increases or decreases the hour of the input date and time and returns the date and time value.

Data type

Location

Type

First input handler

Date

Second input handler

Numeric (integer)

Logic output

Date

Property

Category

Property

Description

Comment

Comment

It does not affect the conversion processing.

Function details

Calculation method

This logic adds the numerical value of the second input handler in hours to the date and time of the first input handler. You can specify only an integer as a number.

First Input Handler (Date and Time)

Second Input Handler (Hours)

Output Date and Time

2021-01-01T00:00:00.0000000+09:00

1

2021-01-01T01:00:00.0000000+09:00

2021-01-01T00:00:00.0000000+09:00

-1

2020-12-31T23:00:00.0000000+09:00

2021-01-01T00:00:00.0000000+09:00

25

2021-01-02T01:00:00.0000000+09:00

Notes

  • If a nonexistent date and time is input, or if such a calculation result is obtained, it is automatically corrected to an existing date and time. For example, 2021/04/30 25:00:00 becomes 2021/05/01 01:00:00.

  • The maximum and minimum values of the second input handler (upper connecting line) are as follows:

    Maximum: 24

    Minimum: -24

    If you enter a value outside of the above range for the second input handler, the calculation result value overflows. Specify an input value within the range.

  • If you enter a floating point in the second input handler, an error such as the following occurs:

    2021-02-12T17:13:06 A tuple was dropped from the topology

    EES0AGENT01711,[unsupported cast int from float]

    map[data:{} timestamp:\"2021-02-12T17:13:06.1596229+09:00\"]

Example of logic use

Mapping definition

Increases or decreases hour

Logic settings and processing result

This logic increases or decreases the date and time of the input data in hours and then outputs it.

For the date type data to specify for the input data, use a value that is output from one of the following logics:

  • Current date/time (UTC)

  • Current date/time (OS time zone)

  • Date/Time formatting(Standard format)

  • Date/Time formatting(Custom)

Property settings

Property

Setting Value

None

Input data

Date type data that represents the following dates and times

2019-01-01T01:00:00.0000000+09:00,-2

2020-02-02T10:00:00.0000000+09:00,11

2021-03-03T15:00:00.0000000+09:00,20

Output data

2018-12-31T23:00:00.0000000+09:00

2020-02-02T21:00:00.0000000+09:00

2021-03-04T11:00:00.0000000+09:00