Question
I would like to add one month to a string type year-month data "yyyyMM" with the [Calculate Month] logic.
Answer
-Specification
The [Calculate Month] logic increases/decreases the month value of date type input.
Therefore, the input data must be a date type.
-Solution
You can add one month to a string type year-month data "yyyyMM" with the [Calculate Month] logic, following the steps below.
1. Convert the string type "yyyyMM" to a date type with the [Parse Date/Time] logic.
2. Add "1" to the date with the [Calculate Month] logic.
3. Convert the increased date to the string type "yyyyMM" again with the [Date/Time Formatting] logic.
For more information on each logic, please refer to the following mauals.
[Parse Date/Time]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/CustomToIso8601.htm
[Increase/Decrease Month]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/CalcMonth.htm
[Date formatting]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/Iso8601ToCustom.htm
Comments
0 comments
Article is closed for comments.