Skip to main content

P6-Loader - Financial Periods

Financial periods must be created manually in P6. It is a tedious process mainly because it seems that it would be so easy to automate it! Well, with the P6-Loader, you can.

In the P6-Loader, the financial period is a global object you can export.


Below is what the extracted data looks like.



Now suppose I want to add a few more years of financial periods. I can just populate it using the Excel formulas at hand.



This is what each formula is:
  • StartDate: =DATE(YEAR(C17), MONTH(C17) + 1, DAY(C17))
    • This creates a new date with the year and day of the financial period on the above line, plus on month.
  • EndDate: =DATE(YEAR(C18), MONTH(C18) + 1, DAY(C18))-1
    • This takes the date of the start of the financial period, adds a month, and subtracts a day - that puts it at the end of the month.
The cell “Name” is just the value of the StartDate but formatted as a date with the format “YYYY-MM-DD”.



Now, as you can see a hint for in the screenshot above, you can just copy and paste that row as many times as needed in Excel, and you have your financial periods.



Load this with the P6-Loader, and you are done.



And that’s it. Your new financial periods are all loaded.

OPTIONAL: Complex Periods and Kotlin Script

Sometimes, you may have more complex requirements. For this customer, the requirements were that each financial period lasts a month, but the first day is always a Sunday and the last day is always a Saturday. This required some programming. Below is the script I wrote for this use case.



Even though writing a script was necessary, I just copied the results into Excel and was able to load these financial periods. Below is what it looked like in Excel after I pasted it from the script above.




No video selected.

About the Author

Ravi Wallau - Integration Specialist

Ravi started working with computers as a child, programming with BASIC language on his MSX, a platform once popular outside of North America. In 1998, Ravi started an internship where he further developed his programming skills. After one year, this internship became his first job, where he gained experience developing industrial automation systems.

Over time, Ravi has worked in many different industries and programming languages, developing banking, integration and mobile solutions in C/C++, Java, Visual Basic and C # for a variety of platforms.

From 2007 to 2011, Ravi moved from Brazil, his native country, to Canada with the desire to live and learn another culture, as well as gain experience working in diverse environments.

Since 2009, Ravi has been an important part of the team at Emerald Associates. He has participated in key integration projects with major clients, such as CL&P, Suncor and Nexen, acting as the key technical lead in all phases of the projects. Ravi is also a key contributor at Emerald Associates in the development of unique in-house products such as TAPS, EP-datawarehouse, CAPPS, P6-Auditor and P6-Loader.

Ravi is a dedicated and insightful developer, one who prides himself on the quality of his work. He truly strives to provide optimal functionality so that each piece of a complex integration system fits together to give the end-user what they really need and more.

Leave a comment

Please login to leave a comment.