{"id":1824,"date":"2023-01-06T17:50:52","date_gmt":"2023-01-06T23:50:52","guid":{"rendered":"http:\/\/xlfxs.com\/?p=1824"},"modified":"2023-01-06T17:50:52","modified_gmt":"2023-01-06T23:50:52","slug":"unix-datetime-number","status":"publish","type":"post","link":"https:\/\/xlfxs.com\/?p=1824","title":{"rendered":"Unix DateTime Number"},"content":{"rendered":"\n<p>Convert Date\/time number from regular number to Unix DateTime Number.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>A project I worked on, needed to grab info from Yahoo! finance passing to it the datetime of certain period.<\/p>\n\n\n\n<p>This function was part of the solution to convert a date as we human use it to Unix datetime number for the website to populate finance info of that period.<\/p>\n\n\n\n<p>The final formula is<\/p>\n\n\n\n<p><code>=(B5<em>24<\/em>60<em>60)-(DATE(1970,1,1)<\/em>24<em>60<\/em>60)<\/code><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2023\/01\/UnixDateTimeNumber1.jpg\"><img decoding=\"async\" src=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2023\/01\/UnixDateTimeNumber1.jpg\" alt=\"\" class=\"wp-image-1823\"\/><\/a><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"http:\/\/xlfxs.com\/wp-content\/uploads\/2023\/01\/UnixDateTimeNumber.xlsx\" style=\"border-radius:5px\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/1drv.ms\/x\/s!An4iomsT7EVO674j24Eu_HfM8sKgzg?e=wCmqd7\" style=\"border-radius:5px\" target=\"_blank\" rel=\"noreferrer noopener\">Excel Online<\/a><\/div>\n<\/div>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Convert Date\/time number from regular number to Unix DateTime Number.<\/p>\n","protected":false},"author":1,"featured_media":1823,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,76,23,6],"tags":[121,159],"class_list":["post-1824","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-basic-math","category-date","category-date-and-time","category-standard_functions","tag-date","tag-math"],"_links":{"self":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/1824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1824"}],"version-history":[{"count":0,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/posts\/1824\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=\/wp\/v2\/media\/1823"}],"wp:attachment":[{"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlfxs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}