{"id":10272,"date":"2016-02-25T15:39:26","date_gmt":"2016-02-25T07:39:26","guid":{"rendered":"http:\/\/localhost\/help\/p2-server\/calculations\/time-periods\/production-periods\/"},"modified":"2024-07-04T16:02:19","modified_gmt":"2024-07-04T08:02:19","slug":"production-periods","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/time-periods\/production-periods\/","title":{"rendered":"Production Periods"},"content":{"rendered":"\n<h2><span id=\"Format\">Format<\/span><\/h2>\n<p class=\"intro-text\">IFS OI Server provides functions for calculating the time of specific production periods. The functions all require the same parameters and are used in the same way, but produce a result relevant to the function. All of these functions use the configured production time zone.<\/p>\n<h2>Functions<\/h2>\n<table class=\"toc-table\">\n<tbody>\n<tr>\n<td><strong>Format<\/strong><\/td>\n<td><strong>Returns<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>ProductionDay(Time)<\/strong><\/td>\n<td>The time of the start of the calendar day associated with the production day which started on or before the provided <em>Time<\/em>. This is used when the production day starts before the calendar day begins. After the start of the production day, but before midnight that night, the time is still the current day but the production day is the day after.<\/td>\n<\/tr>\n<tr>\n<td><strong>ProductionDayStart(Time)<\/strong><\/td>\n<td>The time of the start of the production day occurring on or before the provided <em>Time<\/em>.<\/td>\n<\/tr>\n<tr>\n<td><strong>ProductionMonthEnd(Time)<\/strong><\/td>\n<td>The time of the end of the production month which started before the provided\u00a0<em>Time<\/em><\/td>\n<\/tr>\n<tr>\n<td><strong>ProductionMonthStart(Time)<\/strong><\/td>\n<td>The time of the start of the production month occurring on or before the provided <em>Time<\/em>.<\/td>\n<\/tr>\n<tr>\n<td><strong>ProductionWeekStart(Time)<\/strong><\/td>\n<td>The time of the start of the production week occurring on or before the provided Time. Assumes that the week starts on the day specified by the data value.<\/td>\n<\/tr>\n<tr>\n<td><strong>ProductionWeekEnd(Time)<\/strong><\/td>\n<td>The time of the end of the production week occurring after the provided Time. Assumes that the week ends on the day specified by the data value.<\/td>\n<\/tr>\n<tr>\n<td><strong>DayOfProductionMonth(Time)<\/strong><\/td>\n<td>The number of days since the start of the production month, which began on or before the provided <em>Time<\/em>.\u00a0Returns zero (0) for the first 24 hours after the start of the production month, one (1) for the next 24 hours, and so on.\u00a0<\/td>\n<\/tr>\n<tr>\n<td><strong>DayOfProductionWeek(Time)<\/strong><\/td>\n<td>The number of days since the start of the production week which began on or before the provided <em>Time<\/em>. Returns zero (0) for the first 24 hours after the start of the production week, one (1) for the next 24 hours, and so on. Assumes that the week starts on the day specified by the data value.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"Parameters\">Inputs<\/span><\/h2>\n<p class=\"intro-text\"><strong>Time<\/strong>: The time used by the function to perform its calculation.<br \/>\nBehaviour: Required<br \/>\nDimension: Collection, SingleValue, MultiCollection<br \/>\nValid data types: DateTime, Decimal, Integer, String<\/p>\n<p class=\"left-bar-p2blue\">Note: You can use the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/time\/\">Time<\/a>() function to use a valid DateTime argument.<\/p>\n<p class=\"left-bar\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/calculation-syntax\/#Data_Type\">How to format data types<\/a><\/p>\n<h2><span id=\"Examples\">Examples<\/span><\/h2>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ProductionDay(Time() - 60)<\/span><\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ProductionDayStart(Time())<\/span><\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ProductionMonthEnd(Time())<\/span><\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ProductionMonthStart(Time())<\/span><\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ProductionWeekStart(Time())<\/span><\/p>\n<h2><span id=\"Release_History\">Release History<\/span><\/h2>\n<ul class=\"intro-text\">\n<li>Production Periods 4.9.10\n<ul class=\"intro-text\">\n<li>Added <strong>ProductionWeekEnd()<\/strong> function<\/li>\n<\/ul>\n<\/li>\n<li>Production Periods 4.6.5\n<ul class=\"intro-text\">\n<li>Changed Time parameter to support MultiCollection values.<\/li>\n<\/ul>\n<\/li>\n<li>Production Periods 4.0\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>IFS OI Server provides the following functions for calculating the time of specific production periods: ProductionDay, ProductionDayStart, ProductionMonthEnd, \tProductionMonthStart, ProductionWeekStart.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/time-periods\/production-periods\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":9787,"parent":9756,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100,376],"class_list":["post-10272","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","tag-production-periods","Version-4-0","Version-4-6-5","Version-4-9-10","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=10272"}],"version-history":[{"count":5,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10272\/revisions"}],"predecessor-version":[{"id":67794,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10272\/revisions\/67794"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9756"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/9787"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=10272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=10272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=10272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}