{"id":9669,"date":"2016-02-22T09:36:17","date_gmt":"2016-02-22T01:36:17","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=9669"},"modified":"2024-01-17T10:48:04","modified_gmt":"2024-01-17T02:48:04","slug":"parsedate","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/parsedate\/","title":{"rendered":"ParseDate()"},"content":{"rendered":"\n<h2><span id=\"Format\">Format<\/span><\/h2>\n<p class=\"intro-text\"><strong>ParseDate(StringTime [,FormatString])<\/strong><\/p>\n<h2><span id=\"Returns\">Returns<\/span><\/h2>\n<p class=\"intro-text\">Returns the time that is the result of parsing the provided String\u00a0argument.<\/p>\n<h2><span id=\"Parameters\">Inputs<\/span><\/h2>\n<p class=\"intro-text\"><strong>StringTime<\/strong>: The time expressed as a string.<br \/>\nBehaviour: Required<br \/>\nDimension: Collection, SingleValue, MultiCollection<br \/>\nValid\u00a0data types:\u00a0String<\/p>\n<p class=\"intro-text\"><strong>FormatString<\/strong>: The expected format of <em>StringTime\u00a0<\/em>according to the Format Codes table below. \u00a0If this\u00a0is not specified, <em>StringTime<\/em> is assumed to be in ISO format.\u00a0The spacing of the FormatString parameter must exactly match that of the <em>StringTime<\/em> parameter, including spaces.<br \/>\nBehaviour:\u00a0Optional<br \/>\nDimension: Collection, SingleValue<br \/>\nValid data types: 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>Format Codes<\/h2>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>YYYY<\/strong><\/td>\n<td width=\"315\">Four-digit year<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>YY<\/strong><\/td>\n<td width=\"315\">Two-digit year (00 to 99, from 2000)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>IY<\/strong><\/td>\n<td width=\"315\">Two-digit year (00 to 99, from 2000)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>MM<\/strong><\/td>\n<td width=\"315\">Two-digit month (01 to 12)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>DD<\/strong><\/td>\n<td width=\"315\">Two-digit day of month (01 to 31)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>HH<\/strong><\/td>\n<td width=\"315\">Two-digit hour (00 to 23)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>MI<\/strong><\/td>\n<td width=\"315\">Two-digit minute (00 to 59)<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"81\"><strong>SS<\/strong><\/td>\n<td width=\"315\">Two-digit seconds (00 to 59)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"Examples\">Examples<\/span><\/h2>\n<p class=\"intro-text\">Expression:\u00a0<span class=\"code-fragment\">ParseDate(\"2007-12-31T15:00:00+00:00\")<\/span><br \/>\nResult:\u00a0Produces the UTC seconds since 1970 of this time.<\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">ParseDate(\"01 01-01-1970\", \"MI DD\/MM\/YYYY\u201d)<\/span><br \/>\nResult:\u00a0Returns an error because the hour is not specified in the FormatString pattern.<\/p>\n<p class=\"intro-text\">Expression:\u00a0<span class=\"code-fragment\">ParseDate(\"01-01-2007 00:00:01\", \"DD\/MM\/YYYY HH:MI:SS\")<\/span><br \/>\nResult:\u00a0Returns an error because the StringTime argument uses dashes to separate the year, month and day, but the FormatString pattern uses slashes.<\/p>\n<h2><span id=\"Release_History\">Release History<\/span><\/h2>\n<ul class=\"intro-text\">\n<li>ParseDate() 4.6.5\n<ul class=\"intro-text\">\n<li>Changed StringTime parameter to support MultiCollection values.<\/li>\n<\/ul>\n<\/li>\n<li>ParseDate() 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 ParseDate() to get the time that is the result of parsing a string argument.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/parsedate\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":9672,"parent":3650,"menu_order":160,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100,365],"class_list":["post-9669","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","tag-parsedate","Version-4-0","Version-4-6-5","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9669","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=9669"}],"version-history":[{"count":2,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9669\/revisions"}],"predecessor-version":[{"id":64750,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/9669\/revisions\/64750"}],"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\/9672"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=9669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=9669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=9669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}