{"id":10326,"date":"2016-02-26T11:37:12","date_gmt":"2016-02-26T03:37:12","guid":{"rendered":"http:\/\/localhost\/help\/p2-server\/calculations\/shiftend\/"},"modified":"2024-08-15T10:31:31","modified_gmt":"2024-08-15T02:31:31","slug":"shiftend","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/shiftend\/","title":{"rendered":"ShiftEnd()"},"content":{"rendered":"\n<h2><span id=\"Format\">Format<\/span><\/h2>\n<p class=\"intro-text\"><strong>ShiftEnd(Time\u00a0[,Site] [,ShiftPattern])<\/strong><\/p>\n<h2><span id=\"Returns\"><span id=\"Returns\">Returns<\/span><\/span><\/h2>\n<p class=\"intro-text\">Returns the time of the end\u00a0of the shift occurring on or before the provided <em>Time<\/em>.<\/p>\n<p class=\"intro-text\">The site and shift patterns are optional inputs.\u00a0 If these parameters are not specified, then the Default Site and the Default Shift Pattern of that site will be used.\u00a0<\/p>\n<h2>Inputs<\/h2>\n<p class=\"intro-text\"><strong>Time<\/strong>: The time from which to calculate the end\u00a0of the shift.<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=\"intro-text\"><b>Site:\u00a0<\/b>Name of the site which contains the shift pattern to use. If this parameter is null or empty string, the default site will be used.<br \/>\nBehaviour: Optional<br \/>\nDimensions: SingleValue<br \/>\nValid data types: Null, String<\/p>\n<p class=\"intro-text\"><b>ShiftPattern:\u00a0<\/b>Name of the shift pattern to use. If this parameter is null or empty string, the default shift pattern will be used.<br \/>\nBehaviour: Optional<br \/>\nDimensions: SingleValue<br \/>\nValid data types: Null, String<\/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>Examples<\/h2>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ShiftEnd(Time())<\/span><br \/>\nResult: Returns the end time of the shift occurring on or before the provided Time using the default shift pattern of the default site.<\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ShiftEnd(Time(), 'Perth', 'Operations')<\/span><br \/>\nResult: Returns the end time of the shift occurring on or before the provided Time using the 'Operations' shift pattern of the 'Perth' site.<\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ShiftEnd(Time(), null, 'Operations')<\/span><br \/>\nResult: Returns the end time of the shift occurring on or before the provided Time using the 'Operations' shift pattern of the default site.<\/p>\n<h2><span id=\"Release_History\">Release History<\/span><\/h2>\n<ul class=\"intro-text\">\n<li>ShiftEnd() 4.10.2\n<ul class=\"intro-text\">\n<li>Added optional parameters to specify a site and shift pattern to be used in the calculation.<\/li>\n<\/ul>\n<\/li>\n<li>ShiftEnd() 4.6.5\n<ul class=\"intro-text\">\n<li>Changed Time parameter to support MultiCollection values.<\/li>\n<\/ul>\n<\/li>\n<li>ShiftEnd() 4.0\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use ShiftEnd() to get the time of the end of the shift.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/shiftend\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":10330,"parent":3650,"menu_order":190,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100,401],"class_list":["post-10326","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","tag-shifts","Version-4-0","Version-4-6-5","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10326","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=10326"}],"version-history":[{"count":9,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10326\/revisions"}],"predecessor-version":[{"id":64970,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/10326\/revisions\/64970"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/10330"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=10326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=10326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=10326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}