Calculate Day

Calculate Day

Logic name

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

Function

This logic increases or decreases the day 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 day. Digits after the decimal point of the specified number are round off.

First input handler (date/time)

Second input handler (number of days)

Output date/time

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

1

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

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

1.23

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

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

-1

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

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

31

2005-02-01T00: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 Day

Logic settings and processing result

The logic increases or decreases the day 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-10T02:00:00.000+0900,11

2009-03-15T03:00:00.000+0900,20

Output data

2006-12-30T01:00:00.000+0900

2008-02-21T02:00:00.000+0900

2009-04-04T03:00:00.000+0900

 

= Hint =

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