Calculate Hour

Calculate Hour

Logic name

Calculate Hour (Document Mapper/Variable Mapper/Merge Mapper)

Function

This logic increases or decreases the hour of the date/time in input data and returns the result.

Data types

Location

Type

First input handler

Date

Second input handler

Numeric

Logic output

Date

= Hint =

Refer to the following for details:

Properties

Category

Property

Description

Comment

Comment

You can write a description of the logic. It doesn't affect the conversion process.

Function details

Calculation

The logic adds the numeric value of the second input handler to the date/time of the first input handler by hour. Digits after the decimal point of the specified number are round off.

First input handler (date/time)

Second input handler (number of hours)

Output date/time

2005-01-01T00:00:00+0900

1

2005-01-01T01:00:00+0900

2005-01-01T00:00:00+0900

1.23

2006-01-01T01:00:00+0900

2005-01-01T00:00:00+0900

-1

2004-12-31T23:00:00+0900

2005-01-01T00:00:00+0900

25

2005-01-02T01:00:00+0900

Notes

  • When non-existing data/time is input or retrieved as the result of the calculation, it is automatically corrected to an actual existing date/time (for example: 2005/04/31 -> 2005/05/01).

Logic sample

Mapping definition

Calculate Hour

Logic settings and processing result

The logic increases or decreases the hour of the date/time in the input data and outputs the result.

Property settings

Property

Setting

None

 

Input data

2007-01-01T01:00:00.000+0900,-2

2008-02-02T10:00:00.000+0900,11

2009-03-03T15:00:00.000+0900,20

Output data

2006-12-31T23:00:00.000+0900

2008-02-02T21:00:00.000+0900

2009-03-04T11:00:00.000+0900

 

= Hint =

For a list of logics, refer to Mapper Logic Guide.