{"id":513,"date":"2021-09-03T20:01:43","date_gmt":"2021-09-03T20:01:43","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/office-formating-to-a-date-excel-2010-19229-html"},"modified":"2021-09-03T20:01:43","modified_gmt":"2021-09-03T20:01:43","slug":"office-formating-to-a-date-excel-2010-19229-html","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/office\/formating-to-a-date-excel-2010\/19229.html","title":{"rendered":"Solved Formating to a date Excel 2010"},"content":{"rendered":"<p><td>Hi everyone<\/p>\n<p>This might be an easy one for whoever knows it<\/p>\n<p>I have a number 8202014<br \/>I need to format it as a date to show 08\/20\/14<\/p>\n<p>And the formula should also work for 10202014 to show 10\/20\/14<\/p>\n<p>I cant make a formula with left, mid, right that works correctly.<\/p>\n<p>Thanks in advance!!!<\/p>\n<\/td>\n<td>If you know that the cell will only contain 7 or 8 digits, you don&#8217;t need the second IF clause. The <i>logical_test<\/i> will either be TRUE for 7 digits or FALSE for 8, so a single IF function is all that you need.<\/p>\n<p>This version is shorter and slightly more efficient:<\/p>\n<p>=IF(LEN(E10)=7,DATE(RIGHT(E10,4),LEFT(E10,1),MID(E10,2,2)),<br \/>DATE(RIGHT(E10,4),LEFT(E10,2),MID(E10,3,2)))<\/p>\n<\/p>\n<p><a href=\"http:\/\/www.computing.net\/howtos\/show\/posting-tables-with-the-pre-tag\/484.html\"><font><i><b>Click Here Before Posting Data or VBA Code &#8212;&gt; How To Post Data or Code.<\/b><\/i><\/font><\/a><\/p>\n<\/td>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","meta":{"inline_featured_image":false,"iawp_total_views":31},"question-category":[],"question_tags":[],"class_list":["post-513","question","type-question","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=513"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=513"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=513"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}