{"id":645,"date":"2020-05-05T15:29:35","date_gmt":"2020-05-05T07:29:35","guid":{"rendered":"http:\/\/www.yohz.com\/blogs\/?p=645"},"modified":"2020-05-05T15:54:56","modified_gmt":"2020-05-05T07:54:56","slug":"formatting-date-and-time-values-in-csv-files","status":"publish","type":"post","link":"https:\/\/www.yohz.com\/blogs\/2020\/05\/05\/formatting-date-and-time-values-in-csv-files\/","title":{"rendered":"Formatting date and time values in CSV files"},"content":{"rendered":"<h2>Identifying the columns correctly<\/h2>\n<p>The first step in importing a CSV file into <a href=\"https:\/\/www.yohz.com\/ya_eea_overview.htm\">Easy Excel Analysis<\/a> is to ensure that each column is correctly identified.\u00a0 In this example, we will work with the sample CSV file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-646\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates01.png\" alt=\"\" width=\"828\" height=\"406\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates01.png 828w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates01-300x147.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates01-768x377.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates01-624x306.png 624w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/p>\n<p>When we first open this file in <a href=\"https:\/\/www.yohz.com\/ya_eea_overview.htm\">Easy Excel Analysis<\/a> and click on the <strong>Preview<\/strong> button, an error is raised regarding the number of columns.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-647\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates02.png\" alt=\"\" width=\"626\" height=\"462\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates02.png 626w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates02-300x221.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates02-624x461.png 624w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/p>\n<p>Our CSV file encloses text in quotes, so we&#8217;ll need to select the <strong>Field values are quoted using &#8220;<\/strong> option (since we&#8217;re using double quotes as the quote character), and click <strong>Preview<\/strong> again:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-654\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates07.png\" alt=\"\" width=\"666\" height=\"581\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates07.png 666w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates07-300x262.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates07-624x544.png 624w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/p>\n<p>All the columns seem to be in order, so we can proceed.<\/p>\n<h2>Adjusting the date format<\/h2>\n<p>On the next page, <a href=\"https:\/\/www.yohz.com\/ya_eea_overview.htm\">Easy Excel Analysis<\/a> has set up the date and time formats based on our computer&#8217;s settings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-649\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates04.png\" alt=\"\" width=\"468\" height=\"238\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates04.png 468w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates04-300x153.png 300w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/p>\n<p>The date format is different from that in our CSV file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-650\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates05.png\" alt=\"\" width=\"514\" height=\"406\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates05.png 514w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates05-300x237.png 300w\" sizes=\"(max-width: 514px) 100vw, 514px\" \/><\/p>\n<p>If we continue to the next step, our <strong>OrderDate<\/strong> column will be identified as a <strong>Text<\/strong> field, because the date format in the CSV file does not match our settings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-655\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates08.png\" alt=\"\" width=\"641\" height=\"309\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates08.png 641w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates08-300x145.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates08-624x301.png 624w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/p>\n<p>Thus, we&#8217;ll need to change the date format settings accordingly.\u00a0 Go back to the previous step, and select the correct date format from the list of pre-defined formats, or enter the format manually.\u00a0 Note that <strong>d<\/strong> represents the date, <strong>m<\/strong> for month, and <strong>yyyy<\/strong> for the year.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-653\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates06-1.png\" alt=\"\" width=\"366\" height=\"184\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates06-1.png 366w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates06-1-300x151.png 300w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/p>\n<p>Once we have set up the date format to correctly match that in our CSV file, <a href=\"https:\/\/www.yohz.com\/ya_eea_overview.htm\">Easy Excel Analysis<\/a> will set up the <strong>OrderDate<\/strong> column as a <strong>Date and time<\/strong> column.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-656\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates09.png\" alt=\"\" width=\"666\" height=\"310\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates09.png 666w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates09-300x140.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates09-624x290.png 624w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/p>\n<p>If your date columns contain month names e.g.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-657\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates10.png\" alt=\"\" width=\"471\" height=\"312\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates10.png 471w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates10-300x199.png 300w\" sizes=\"(max-width: 471px) 100vw, 471px\" \/><\/p>\n<p>then just enter a blank value as the date format.\u00a0 <a href=\"https:\/\/www.yohz.com\/ya_eea_overview.htm\">Easy Excel Analysis<\/a> will then try to parse the value as best as it can.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-658\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates11.png\" alt=\"\" width=\"420\" height=\"101\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates11.png 420w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates11-300x72.png 300w\" sizes=\"(max-width: 420px) 100vw, 420px\" \/><\/p>\n<h2><\/h2>\n<h2>Adjusting the time format<\/h2>\n<p>Adjusting the time format is similar to the steps described above for date formats.\u00a0 You can manually enter a format value if none of the listed formats match.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-662\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates12.png\" alt=\"\" width=\"394\" height=\"182\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates12.png 394w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/eea_csv_dates12-300x139.png 300w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/05\/formatting-date-and-time-values-in-csv-files\/\" action=\"like\" colorscheme=\"light\" layout=\"button\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/05\/formatting-date-and-time-values-in-csv-files\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Identifying the columns correctly The first step in importing a CSV file into Easy Excel Analysis is to ensure that each column is correctly identified.\u00a0 In this example, we will work with the sample CSV file: When we first open this file in Easy Excel Analysis and click on the Preview button, an error is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[82],"tags":[83,84,85],"_links":{"self":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/645"}],"collection":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":4,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"predecessor-version":[{"id":663,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/645\/revisions\/663"}],"wp:attachment":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/tags?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}