Focal Point
Focus

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3381067012

January 31, 2007, 10:58 PM
manash
Focus
I have a input file which contains a date field in format I6YMD format. In the output file I want a field which will print the above date + 1 day for each record.
Ex - if the date is 05/01/22 the in output file i want 05/01/23.
but i also need to take care of conditions such as if the date in input file is 31 then i have to increment the month by 1 and make the date as 01. Similarly if the month in input is 12 then i have to increment the year.

Similarly what if i want to increment the year only by 1
Ex - If the input value is 06/01/22 then in output i want it as 07/01/22.


FOCUS 7.1.1/ MF(OS/390)
January 31, 2007, 11:57 PM
OPALTOSH
DEFINE a field with format YMD and assign you input data to it.
DEFINE a new field which takes the new field and adds 1 (ie 1 day) and then reassign this result to a field with format I6YMD and this is the field for your output file.

If you want to add a year then use one of the Date functions.
February 01, 2007, 02:19 AM
manash
Thanx a lot OPALTOSH i was able to solve my query.


FOCUS 7.1.1/ MF(OS/390)
February 01, 2007, 08:43 AM
Francis Mariani
It's hard to focus when the topic title is "Focus". It probably is a good idea to use a more descriptive title.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server