{"id":1493,"date":"2019-03-25T17:35:20","date_gmt":"2019-03-25T20:35:20","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/"},"modified":"2019-05-22T13:53:09","modified_gmt":"2019-05-22T16:53:09","slug":"kb33740-converting-storages-e3-timestamp-field-into-datetime","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/","title":{"rendered":"KB-33740: Converting Storage&#8217;s E3 TimeStamp field into DateTime."},"content":{"rendered":"<div align=\"justify\">\n<p><strong>Question:<\/strong><\/p>\n<p>Can I create a query converting the <b>E3TimeStamp <\/b>field from the <b>E3Storage<\/b>&#8216;s table into <b>DateTime<\/b>?<\/p>\n<p><strong>Solution:<\/strong><\/p>\n<p>Yes, you can do this.<\/p>\n<p>If you are using <strong>Oracle<\/strong>, you must use <i>E3GetDateValue <\/i>function, created automatically by <span style=\"font-weight: bold;\">E3<\/span>. This function converts a number into a date. To visualize on the date\/time format, also use <i>TO_CHAR<\/i> function.<\/p>\n<p><span style=\"font-weight: bold;\">Example:<\/span><\/p>\n<pre><span style=\"font-family: Courier New;\">Query.SQL = \"SELECT TO_CHAR(E3GETDATEVALUE(E3TimeStamp),'DD\/MM\/YYYY HH:MI:SS')AS E3TimeStamp ,\r\nFieldValue FROM <%TableName%> WHERE ( E3TimeStamp\u00a0 >= <%StartTime%>\u00a0 AND\u00a0\u00a0 E3TimeStamp <= <%EndTime%>\r\nAND FieldID = <%Fid%> ) ORDER BY E3TimeStamp\"<\/span><\/pre>\n<p>To display date\/time with the accuracy of milliseconds, add <i>SSSSSS<\/i> to the date format in the <i>TO_CHAR<\/i> command.<\/p>\n<p><span style=\"font-weight: bold;\">Example:<\/span><\/p>\n<div align=\"left\"><span style=\"font-family: Courier New;\">SELECT TO_CHAR(E3GETDATEVALUE(E3TimeStamp),&#8217;DD-MM-YYYY HH:MI:SS.SSSSS&#8217;)AS E3TimeStamp <\/span><br \/>\n<span style=\"font-family: Courier New;\">FROM <%TableName%><\/span><\/div>\n<p><span style=\"font-weight: bold;\">Note<\/span>: To create a filter by date, fill in <i><%StartTime%><\/i> and <i><%EndTime%><\/i> variables with date\/time in Float or Double format. Use <i>CDbl()<\/i> function from the VBScript to convert a date into Double.<\/p>\n<p>If you are using <strong>SQL<\/strong>, use\u00a0 <i>CONVERT <\/i>command: <span style=\"font-family: Courier New;\">CONVERT ( data_type [ ( length ) ] , expression [ , style ] )<\/span>.<\/p>\n<p><b>Example:<\/b><\/p>\n<pre><span style=\"font-family: Courier New;\">Query.SQL = \"SELECT FieldID,Convert(datetime,E3TimeStamp -2) AS E3TimeStamp,FieldValue FROM\r\n <%TableName%> WHERE ( E3TimeStamp\u00a0 >= <%StartTime%>\u00a0 AND\u00a0\u00a0 E3TimeStamp <= <%EndTime%> AND\r\n FieldID = <%Fid%> ) ORDER BY E3TimeStamp\"<\/span><\/pre>\n<p><span style=\"font-weight: bold;\">Note<\/span>: You must write &#8220;<span style=\"font-family: Courier New;\">E3TimeStamp -2<\/span>&#8221; in this case, because there is a difference between Elipse E3&#8217;s and SQL&#8217;s default calendars. The default date used by E3 is 30\/12\/1899 0:00:00; SQL, on the other hand, uses 01\/01\/1900 0:00:00. When recording the information in the database, E3 will use its default date; SQL, however, will use own date when converting.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Question: Can I create a query converting the E3TimeStamp field from the E3Storage&#8216;s table into DateTime? Solution: Yes, you can do this. If you are using Oracle, you must use&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[743,744],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KB-33740: Converting Storage&#039;s E3 TimeStamp field into DateTime. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KB-33740: Converting Storage&#039;s E3 TimeStamp field into DateTime.\" \/>\n<meta property=\"og:description\" content=\"Question: Can I create a query converting the E3TimeStamp field from the E3Storage&#8216;s table into DateTime? Solution: Yes, you can do this. If you are using Oracle, you must use&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:35:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-22T16:53:09+00:00\" \/>\n<meta name=\"author\" content=\"Elipse Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elipse Software\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\"},\"author\":{\"name\":\"Elipse Software\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\"},\"headline\":\"KB-33740: Converting Storage&#8217;s E3 TimeStamp field into DateTime.\",\"datePublished\":\"2019-03-25T20:35:20+00:00\",\"dateModified\":\"2019-05-22T16:53:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\"},\"wordCount\":219,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"E3Query\",\"E3Storage\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\",\"name\":\"[:pt]KB-33740: Converting Storage's E3 TimeStamp field into DateTime.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:35:20+00:00\",\"dateModified\":\"2019-05-22T16:53:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KB-33740: Converting Storage&#8217;s E3 TimeStamp field into DateTime.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\",\"name\":\"Elipse Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"caption\":\"Elipse Software\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KB-33740: Converting Storage's E3 TimeStamp field into DateTime. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]KB-33740: Converting Storage's E3 TimeStamp field into DateTime.[:] - Elipse Knowledgebase","og_description":"Question: Can I create a query converting the E3TimeStamp field from the E3Storage&#8216;s table into DateTime? Solution: Yes, you can do this. If you are using Oracle, you must use&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:35:20+00:00","article_modified_time":"2019-05-22T16:53:09+00:00","author":"Elipse Software","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elipse Software","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/"},"author":{"name":"Elipse Software","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87"},"headline":"KB-33740: Converting Storage&#8217;s E3 TimeStamp field into DateTime.","datePublished":"2019-03-25T20:35:20+00:00","dateModified":"2019-05-22T16:53:09+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/"},"wordCount":219,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["E3Query","E3Storage"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/","url":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/","name":"[:pt]KB-33740: Converting Storage's E3 TimeStamp field into DateTime.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:35:20+00:00","dateModified":"2019-05-22T16:53:09+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/kb33740-converting-storages-e3-timestamp-field-into-datetime\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"KB-33740: Converting Storage&#8217;s E3 TimeStamp field into DateTime."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87","name":"Elipse Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","caption":"Elipse Software"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/1493"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=1493"}],"version-history":[{"count":3,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/1493\/revisions"}],"predecessor-version":[{"id":6486,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/1493\/revisions\/6486"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=1493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=1493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}