Unable to get Excel to recognise date in column











up vote
36
down vote

favorite
7












I constantly have problems working with dates in Excel, I must be doing something wrong but I don't understand what.



I have a spreadsheet, exported from our exchange server, that contains a column with dates on. They have come out in US format even though I'm in the UK.



The column in question looks like this



04/08/2012
04/09/2009
04/01/2010
04/21/2011
04/05/2012
08/30/2009
08/29/2010
08/28/2011


In Excel, I have highlighted the column and selected Format Cells.... In this dialog box, I have selected the Date, selected English (United States) as the locale and chosen the matching date format from the list. I hit OK and try to sort the data by this column.



In the sort dialogue I choose this column, select sort on Values but the order only gives me options for A to Z, not oldest to newest as I would expect.



This in turn sorts the date data by the first two digits.



I am aware I could re-format this data to ISO and then the A to Z sort would work but I shouldn't have too, I'm obviously missing something. What is it?



EDIT: I messed up the bounty but this should have gone to @r0berts answer, his first suggestion of Text to Columns with no delimiter and choosing 'MDY' as the type of data works. Additionally, if you have a time (i.e. 04/21/2015 18:34:22), you need to first get rid of the time data. However after that the method suggested by @r0berts works fine.










share|improve this question
























  • I would suspect the issue is Excel not knowing how to do this - you can test. When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date!
    – Dave
    Mar 17 '15 at 9:14










  • What is the format of the exported data? Is it CSV or XLSX?
    – Excellll
    Mar 18 '15 at 14:44















up vote
36
down vote

favorite
7












I constantly have problems working with dates in Excel, I must be doing something wrong but I don't understand what.



I have a spreadsheet, exported from our exchange server, that contains a column with dates on. They have come out in US format even though I'm in the UK.



The column in question looks like this



04/08/2012
04/09/2009
04/01/2010
04/21/2011
04/05/2012
08/30/2009
08/29/2010
08/28/2011


In Excel, I have highlighted the column and selected Format Cells.... In this dialog box, I have selected the Date, selected English (United States) as the locale and chosen the matching date format from the list. I hit OK and try to sort the data by this column.



In the sort dialogue I choose this column, select sort on Values but the order only gives me options for A to Z, not oldest to newest as I would expect.



This in turn sorts the date data by the first two digits.



I am aware I could re-format this data to ISO and then the A to Z sort would work but I shouldn't have too, I'm obviously missing something. What is it?



EDIT: I messed up the bounty but this should have gone to @r0berts answer, his first suggestion of Text to Columns with no delimiter and choosing 'MDY' as the type of data works. Additionally, if you have a time (i.e. 04/21/2015 18:34:22), you need to first get rid of the time data. However after that the method suggested by @r0berts works fine.










share|improve this question
























  • I would suspect the issue is Excel not knowing how to do this - you can test. When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date!
    – Dave
    Mar 17 '15 at 9:14










  • What is the format of the exported data? Is it CSV or XLSX?
    – Excellll
    Mar 18 '15 at 14:44













up vote
36
down vote

favorite
7









up vote
36
down vote

favorite
7






7





I constantly have problems working with dates in Excel, I must be doing something wrong but I don't understand what.



I have a spreadsheet, exported from our exchange server, that contains a column with dates on. They have come out in US format even though I'm in the UK.



The column in question looks like this



04/08/2012
04/09/2009
04/01/2010
04/21/2011
04/05/2012
08/30/2009
08/29/2010
08/28/2011


In Excel, I have highlighted the column and selected Format Cells.... In this dialog box, I have selected the Date, selected English (United States) as the locale and chosen the matching date format from the list. I hit OK and try to sort the data by this column.



In the sort dialogue I choose this column, select sort on Values but the order only gives me options for A to Z, not oldest to newest as I would expect.



This in turn sorts the date data by the first two digits.



I am aware I could re-format this data to ISO and then the A to Z sort would work but I shouldn't have too, I'm obviously missing something. What is it?



EDIT: I messed up the bounty but this should have gone to @r0berts answer, his first suggestion of Text to Columns with no delimiter and choosing 'MDY' as the type of data works. Additionally, if you have a time (i.e. 04/21/2015 18:34:22), you need to first get rid of the time data. However after that the method suggested by @r0berts works fine.










share|improve this question















I constantly have problems working with dates in Excel, I must be doing something wrong but I don't understand what.



I have a spreadsheet, exported from our exchange server, that contains a column with dates on. They have come out in US format even though I'm in the UK.



The column in question looks like this



04/08/2012
04/09/2009
04/01/2010
04/21/2011
04/05/2012
08/30/2009
08/29/2010
08/28/2011


In Excel, I have highlighted the column and selected Format Cells.... In this dialog box, I have selected the Date, selected English (United States) as the locale and chosen the matching date format from the list. I hit OK and try to sort the data by this column.



In the sort dialogue I choose this column, select sort on Values but the order only gives me options for A to Z, not oldest to newest as I would expect.



This in turn sorts the date data by the first two digits.



I am aware I could re-format this data to ISO and then the A to Z sort would work but I shouldn't have too, I'm obviously missing something. What is it?



EDIT: I messed up the bounty but this should have gone to @r0berts answer, his first suggestion of Text to Columns with no delimiter and choosing 'MDY' as the type of data works. Additionally, if you have a time (i.e. 04/21/2015 18:34:22), you need to first get rid of the time data. However after that the method suggested by @r0berts works fine.







microsoft-excel microsoft-excel-2010 microsoft-excel-2007 date






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 26 '16 at 15:09









thilina R

2,11541633




2,11541633










asked Sep 26 '14 at 10:46









Patrick

7382718




7382718












  • I would suspect the issue is Excel not knowing how to do this - you can test. When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date!
    – Dave
    Mar 17 '15 at 9:14










  • What is the format of the exported data? Is it CSV or XLSX?
    – Excellll
    Mar 18 '15 at 14:44


















  • I would suspect the issue is Excel not knowing how to do this - you can test. When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date!
    – Dave
    Mar 17 '15 at 9:14










  • What is the format of the exported data? Is it CSV or XLSX?
    – Excellll
    Mar 18 '15 at 14:44
















I would suspect the issue is Excel not knowing how to do this - you can test. When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date!
– Dave
Mar 17 '15 at 9:14




I would suspect the issue is Excel not knowing how to do this - you can test. When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date!
– Dave
Mar 17 '15 at 9:14












What is the format of the exported data? Is it CSV or XLSX?
– Excellll
Mar 18 '15 at 14:44




What is the format of the exported data? Is it CSV or XLSX?
– Excellll
Mar 18 '15 at 14:44










29 Answers
29






active

oldest

votes

















up vote
63
down vote



accepted










The problem: Excel does not want to recognize dates as dates, even though through "Format cells - Number - Custom" you are explicitly trying to tell it these are dates by "mm/dd/yyyy". As you know; when excel has recognized something as a date, it further stores this as a number - such as "41004" but displays as date according to format you specify. To add to confusion excel may convert only part of your dates such as 08/04/2009, but leave other e.g. 07/28/2009 unconverted.



Solution: steps 1 and then 2



1) Select the date column. Under Data choose button Text to Columns. On first screen leave radio button on "delimited" and click Next. Unclick any of the delimiter boxes (any boxes blank; no checkmarks) and click Next. Under column data format choose Date and select MDY in the adjacent combo box and click Finish. Now you got date values (i.e. Excel has recognised your values as Date data type), but the formatting is likely still the locale date, not the mm/dd/yyyy you want.



2) To get the desired US date format displayed properly you first need to select the column (if unselected) then under Cell Format - Number choose Date AND select Locale : English (US). This will give you format like "m/d/yy". Then you can select Custom and there you can either type "mm/dd/yyyy" or choose this from the list of custom strings.



Alternative : use LibreOffice Calc. Upon pasting data from Patrick's post choose Paste Special (Ctrl+Shift+V) and choose Unformatted Text. This will open "Import Text" dialog box. Character set remains Unicode but for language choose English(USA); you should also check the box "Detect special numbers". Your dates immediately appear in the default US format and are date-sortable. If you wish the special US format MM/DD/YYYY you need to specify this once through "format Cells" - either before or after pasting.



One might say - Excel should have recognised dates as soon as I told it via "Cell Format" and I couldn't agree more. Unfortunately it is only through step 1 from above that I have been able to make Excel recognize these text strings as dates. Obviously if you do this a lot it is pain in the neck and you might put together a visual basic routine that would do this for you at a push of a button.






share|improve this answer























  • I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
    – Patrick
    Sep 26 '14 at 15:05










  • Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
    – r0berts
    Sep 26 '14 at 16:28










  • I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
    – Patrick
    Apr 8 '15 at 16:20










  • Suggestion 1 works like a charm. thanks.
    – Adam
    Dec 1 '17 at 15:28










  • Really good answer!!!
    – Adders
    May 17 at 14:35


















up vote
4
down vote













Select all the column and go to Locate and Replace and just replace "/" with /.






share|improve this answer























  • Can you explain what this does to fix the problem?
    – fixer1234
    Aug 28 '15 at 20:26












  • This really worked and was easy. The replacement thing just remove the leading zeros
    – PedroGabriel
    Jul 7 '17 at 18:08


















up vote
3
down vote













I had the exact same issue with dates in excel. The format matched the requirements for a date in excel, yet without editing each cell it would not recognise the date, and when you are dealing with thousands of rows it is not practical to manually edit each cell. Solution is to run a find and replace on the row of dates where i replaced the hypen with a hyphen. Excel runs through the column replacing like with like but the resulting factor is that it now recongnises the dates! FIXED!






share|improve this answer




























    up vote
    3
    down vote













    This may not be relevant to the original questioner, but it may help someone else who is unable to sort a column of dates.



    I found that Excel would not recognise a column of dates which were all before 1900, insisting that they were a column of text (since 1/1/1900 has numeric equivalent 1, and negative numbers are apparently not allowed). So I did a general replace of all my dates (which were in the 1800s) to put them into the 1900s, e.g. 180 -> 190, 181 -> 191, etc. The sorting process then worked fine. Finally I did a replace the other way, e.g. 190 -> 180.



    Hope this helps some other historian out there.






    share|improve this answer




























      up vote
      2
      down vote













      It seems that Excel does not recognize your dates as dates, it recognizes them text, hence you get the Sort options as A to Z. If you do it correctly, you should get something like this:



      http://i.stack.imgur.com/Qb4Pj.png



      Hence, it is important to ensure that Excel recognizes the date. The most simple way to do that, is use the shortcut CTRL+SHIFT+3.



      Here's what I did to your data. I simply copied it from your post above and pasted it in excel. Then I applied the shortcut above, and I got the required sort option. Check the image.



      http://i.stack.imgur.com/yAa6a.png






      share|improve this answer



















      • 2




        Unfortunately that shortcut does not work for me.
        – Patrick
        Sep 26 '14 at 15:07










      • What does the shortcut do in your system Patrick.
        – Firee
        Sep 29 '14 at 6:21






      • 3




        The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
        – Patrick
        Sep 29 '14 at 9:28










      • The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
        – Scott
        Jun 3 '17 at 22:03












      • (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
        – Scott
        Jun 3 '17 at 22:11


















      up vote
      2
      down vote













      I would suspect the issue is Excel not being able to understand the format... Although you select the Date format, it remains as Text.



      You can test this easily: When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). Then review the format of your cells.



      I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date (note the different formats in the below screen shot)!



      enter image description here



      There are work-arounds for this, but, none of them will be automated simply because you're exporting each time. I would suggest using VBa, where you can simply run a macro which converts from US to UK date format, but, this would mean copying and pasting the VBa into your sheet each time.



      Alternatively, you create an Excel that reads the newly created exported Excel sheets (from exchange) and then execute the VBa to update the date format for you. I will assume the Exported Exchange Excel file will always have the same file name/directory and provide a working example:



      So, create new Excel sheet, called ImportedData.xlsm (excel enabled). This is the file where we will import the Exported Exchange Excel file into!



      Add this VBa to the ImportedData.xlsm file



      Sub DoTheCopyBit()

      Dim dateCol As String
      dateCol = "A" 'UPDATE ME TO THE COLUMN OF THE DATE COLUMN

      Dim directory As String, fileName As String, sheet As Worksheet, total As Integer

      Application.ScreenUpdating = False
      Application.DisplayAlerts = False

      directory = "C:UsersDaveDesktop" 'UPDATE ME
      fileName = Dir(directory & "ExportedExcel.xlsx") 'UPDATE ME (this is the Exchange exported file location)

      Do While fileName <> ""

      'MAKE SURE THE EXPORTED FILE IS OPEN
      Workbooks.Open (directory & fileName)

      Workbooks(fileName).Worksheets("Sheet1").Copy _

      Workbooks(fileName).Close

      fileName = Dir()

      Loop

      Application.ScreenUpdating = True
      Application.DisplayAlerts = True

      Dim row As Integer
      row = 1
      Dim i As Integer
      Do While (Range(dateCol & row).Value <> "")

      Dim splitty() As String
      splitty = Split(Range(dateCol & row).Value, "/")
      Range(dateCol & row).NumberFormat = "@"
      Range(dateCol & row).Value = splitty(2) + "/" + splitty(0) + "/" + splitty(1)
      Range(dateCol & row).NumberFormat = "yyyy-mm-dd"
      row = row + 1
      Loop


      End Sub


      What I also did was update the date format to yyyy-mm-dd because this way, even if Excel gives you the sort filter A-Z instead of newest values, it still works!



      I'm sure the above code has bugs in but I obviously have no idea what type of data you have but I tested it with the a single column of dates (as you have) and it works fine for me!



      How do I add VBA in MS Office?






      share|improve this answer























      • well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
        – Patrick
        Mar 17 '15 at 15:50


















      up vote
      2
      down vote













      https://support.office.com/en-us/article/Convert-dates-stored-as-text-to-dates-8df7663e-98e6-4295-96e4-32a67ec0a680



      Simple solution here - create new column use =datevalue(cell) formula then copy the formula into your other rows- a few seconds to fix






      share|improve this answer




























        up vote
        2
        down vote













        I was dealing with a similar issue with thousands of rows extracted out of a SAP database and, inexplicably, two different date formats in the same date column (most being our standard "YYYY-MM-DD" but about 10% being "MM-DD-YYY"). Manually editing 650 rows once every month was not an option.



        None (zero... 0... nil) of the options above worked. Yes, I tried them all. Copying to a text file or explicitly exporting to txt still, somehow, had no effect on the format (or lack therefo) of the 10% dates that simply sat in their corner refusing to behave.



        The only way I was able to fix it was to insert a blank column to the right of the misbehaving date column and using the following, rather simplistic formula:



        (assuming your misbehaving data is in Column D)



        =IF(MID(D2,3,1)="-",DATEVALUE(TEXT(CONCATENATE(RIGHT(D2,4),"-",LEFT(D2,5)),"YYYY-MM-DD")),DATEVALUE(TEXT(D2,"YYYY-MM-DD")))



        I could then copy the results in my new, calculated column over top of the misbehaving dates by pasting "Values" only after which I could delete my calculated column.






        share|improve this answer






























          up vote
          1
          down vote













          I figured it out!



          There is a space at the beginning and at the end of the date.




          1. If you use find and replace and press the spacebar, it WILL NOT
            work.

          2. You have to click right before the month number, press shift
            and the left arrow to select and copy. Sometimes you need to use the
            mouse to select the space.

          3. Then paste this as the space in find and
            replace and all your dates will become dates.

          4. If there is space and date Select Data>Go to Data>Text to
            columns>Delimited>Space as separator and then finish.

          5. All spaces will be removed.






          share|improve this answer























          • The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
            – Patrick
            Nov 17 '15 at 11:54


















          up vote
          0
          down vote













          If Excel stubbornly refuses to recognize your column as date, replace it by another :




          • Add a new column to the right of the old column

          • Right-click the new column and select Format

          • Set the format to date

          • Highlight the entire old column and copy it

          • Highlight the top cell of the new column and select Paste Special, and only paste values

          • You can now remove the old column.






          share|improve this answer























          • I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
            – Patrick
            Mar 17 '15 at 15:42










          • Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
            – harrymc
            Mar 18 '15 at 8:24




















          up vote
          0
          down vote













          Had similar problem, tried formatting the data as date but to no avail. Then I realized there was a leading space in the date, edited the field and removed the space - hey presto everything ok. Not great for large amounts of data, but thinking about it further I could have maybe checked it and edited the data in Wordpad or a similar editor.






          share|improve this answer




























            up vote
            0
            down vote













            I just simply copied the number 1 (one) and multiplied it to the date column (data) using the PASTE SPECIAL function. It then changes to General formating i.e 42102
            Then go apply Date on the formating and it now recognises it as a date.



            Hope this helps






            share|improve this answer




























              up vote
              0
              down vote













              All the above solutions - including r0berts - were unsuccessful, but found this bizarre solution which turned out to be the fastest fix.



              I was trying to sort "dates" on a downloaded spreadsheet of account transactions.



              This had been downloaded via CHROME browser. No amount of manipulation of the "dates" would get them recognised as old-to-new sortable.



              But, then I downloaded via INTERNET EXPLORER browser - amazing - I could sort instantly without touching a column.



              I cannot explain why different browsers affect the formatting of data, except that it clearly did and was a very fast fix.






              share|improve this answer




























                up vote
                0
                down vote













                My solution in the UK - I had my dates with dots in them like this:



                03.01.17


                I solved this with the following:




                1. Highlight the whole column.

                2. Go to find and select/ replace.

                3. I replaced all the full stops with middle dash eg 03.01.17 03-01-17.

                4. Keep the column highlighted.

                5. Format cells, number tab select date.

                6. Use the Type 14-03-12 (essential for mine to have the middle dash)

                7. Locale English (United Kingdom)


                When sorting the column all dates for the year are sorted.






                share|improve this answer






























                  up vote
                  0
                  down vote













                  So I had the same issue. None of the solutions above either worked for me or I found them too complex for my skill level.



                  What I ended up doing was doing a text-to-columns on the date delimiter. I then used the date() function to recreate the date using the day, month and year cells. Worked.






                  share|improve this answer





















                  • The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                    – Scott
                    Jun 3 '17 at 22:22


















                  up vote
                  0
                  down vote













                  I tried the various suggestions, but found the easiest solution for me was as follows...



                  See Images 1 and 2 for the example... (note - some fields were hidden intentionally as they do not contribute to the example). I hope this helps...




                  1. Field C - a mixed format that drove me absolutely crazy. This is how the data came directly from the database and had no extra spaces or crazy characters. When displaying it as a text for example, the 01/01/2016 displayed as a '42504' type value, intermixed with the 04/15/2006 which showed as is.


                  2. Field F - where I obtained the length of field C (the LEN formula would be a length of 5 of 10 depending on the date format). The field is General format for simplicity.


                  3. Field G - obtaining the month component of the mixed date - based on the length result in field F (5 or 10), I either obtain the month from the date value in field C, or obtain the month characters in the string.


                  4. Field H - obtaining the day component of the mixed date - based on the length result in field F (5 or 10), I either obtain the day from the date value in field C, or obtain the day characters in the string.



                  I can do this for the year as well, then create a date from the three components that is consistent. Otherwise, I can use the individual day, month, and year values in my analysis.



                  Image 1: basic spreadsheet showing values and field names



                  Image 2: spreadsheet showing formulas matching explanation above



                  I hope this helps.






                  share|improve this answer





















                  • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                    – Scott
                    Jun 4 '17 at 20:22












                  • (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                    – Scott
                    Jun 4 '17 at 20:22










                  • (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                    – Scott
                    Jun 4 '17 at 20:23












                  • (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                    – Scott
                    Jun 4 '17 at 20:23










                  • (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                    – Scott
                    Jun 4 '17 at 20:23


















                  up vote
                  0
                  down vote













                  SHARING A LITTLE LONG BUT MUCH EASIER SOLUTION TO SUBJECT.....
                  No need to run macros or geeky stuff....simple ms excel formulae and editing.



                  mixed dates excel snapshot:



                  enter image description here




                  • The date is in the mixed format.

                  • Therefore, to make a symmetrical
                    date format, extra columns have been created converting that 'mixed
                    format' date column to TEXT.

                  • From that text we have identified the
                    positions of "/" and middle text has been extracted determining
                    date, month, year using MID formula.

                  • Those which were originally dates, formula ended with ERROR / #VALUE result. - Finally, from the string we created - we have converted those to dates by DATE formula.


                  • #VALUE were picked as it is by IFERROR added to DATE formula & the column was formatted as required (here, dd/mmm/yy)


                  * REFER THE SNAPSHOT OF EXCEL SHEET ABOVE (= mixed dates excel snapshot) *






                  share|improve this answer























                  • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                    – Scott
                    Jun 4 '17 at 20:20










                  • (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                    – Scott
                    Jun 4 '17 at 20:20


















                  up vote
                  0
                  down vote













                  Select dates and run this code over it..



                  On Error Resume Next
                  For Each xcell In Selection

                  xcell.Value = CDate(xcell.Value)

                  Next xcell

                  End Sub






                  share|improve this answer




























                    up vote
                    0
                    down vote













                    This happens all the time when exchanging date data between locales in Excel.
                    If you have control over the VBA program that exports the data, I suggest exporting the number representing the date instead of the date itself. The number uniquely correlates with a single date, regardless of formatting and locale.
                    For example, instead of the CSV file showing 24/09/2010 it will show 40445.



                    In the export loop when you hold each cell, if it's a date, convert to number using CLng(myDateValue). This is an example of my loop running through all rows of a table and exporting to CSV (note I also replace commas in strings with a tag that I strip when importing, but you may not need this):



                    arr = Worksheets(strSheetName).Range(strTableName & "[#Data]").Value

                    For i = LBound(arr, 1) To UBound(arr, 1)
                    strLine = ""
                    For j = LBound(arr, 2) To UBound(arr, 2) - 1
                    varCurrentValue = arr(i, j)
                    If VarType(varCurrentValue) = vbString Then
                    varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                    End If
                    If VarType(varCurrentValue) = vbDate Then
                    varCurrentValue = CLng(varCurrentValue)
                    End If
                    strLine = strLine & varCurrentValue & ","
                    Next j
                    'Last column - not adding comma
                    varCurrentValue = arr(i, j)
                    If VarType(varCurrentValue) = vbString Then
                    varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                    End If
                    If VarType(varCurrentValue) = vbDate Then
                    varCurrentValue = CLng(varCurrentValue)
                    End If
                    strLine = strLine & varCurrentValue

                    strLine = Replace(strLine, vbCrLf, "<vbCrLf>") 'replace all vbCrLf with tag - to avoid new line in output file
                    strLine = Replace(strLine, vbLf, "<vbLf>") 'replace all vbLf with tag - to avoid new line in output file
                    Print #intFileHandle, strLine
                    Next i





                    share|improve this answer




























                      up vote
                      0
                      down vote













                      I found that CAST AS smalldatetime solves my problem. Solution found here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0f8dd05-4212-428f-8099-748e87c637ae/format-data-from-sql-server-view-as-date-in-excel?forum=sqlkjpowerpivotforexcel



                      That of course only works, if you have access to the underlying query.






                      share|improve this answer




























                        up vote
                        0
                        down vote













                        I was not having any luck with all the above suggestions - came up with a very simple solution that works like a charm. Paste the data into Google Sheets, highlight the date column, click on format, then number, and number once again to change it to number format. I then copy and paste the data into the Excel spreadsheet, click on the dates, then format cells to date. Very quick. Hope this helps.






                        share|improve this answer




























                          up vote
                          0
                          down vote













                          This problem was driving me crazy, then I stumbled on an easy fix. At least it worked for my data. It is easy to do and to remember. But I do not know why this works but changing types as indicated above does not.
                          1. Select the column(s) with the dates
                          2. Search for a year in your dates, for example 2015. Select Replace All with the same year, 2015.
                          3. Repeat for each year.
                          This changes the types to actual dates, year by year.

                          This is still cumbersome if you have many years in your data. Faster is to search for and replace 201 with 201 (to replace 2010 through 2019); replace 200 with 200 (to replace 2000 through 2009); and so forth.






                          share|improve this answer




























                            up vote
                            0
                            down vote













                            I was able to fix the problem after realizing that the "Show Formulas" was selected. in Excel 2016, go to Formulas, then the Formula Auditing section and make sure "Show Formulas" isn't selected. Fixed my problem.






                            share|improve this answer




























                              up vote
                              0
                              down vote













                              I had the similar problem, but I noticed I had an extra spaces at the end of the date. I removed the spaces with replace command and now date sorting works fine.






                              share|improve this answer




























                                up vote
                                0
                                down vote













                                this problem made me almost break my laptop



                                long story short, i had a similar problem where the dates are working just fine in some cells but keep flipping in others regardless if i copy paste or enter manually, i did the whole data text to column and cell formatting solutions and all of that didn't work.



                                the solution actually is not in excel, its in the region and language setting.. i know right !!!



                                to have the dates display as MM/DD/YYYY in the formats tab change the format to US



                                to have the dates display as DD/MM/YYYY in the formats tab change the format to UK



                                Voila !






                                share|improve this answer








                                New contributor




                                Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.

























                                  up vote
                                  -1
                                  down vote













                                  I still had problem after following several answers. Than in the format, chose 14-Mar-01 and changed locale to English (United States).. And it worked perfectly. Hope this helps.






                                  share|improve this answer




























                                    up vote
                                    -1
                                    down vote













                                    I use a mac.



                                    Go to excel preferences> Edit> Date options> Automatically convert date system



                                    Also,



                                    Go to Tables & Filters> Group dates when filtering.



                                    The problem probably started when you received a file with a different date system, and that screwed up your excel date function






                                    share|improve this answer




























                                      up vote
                                      -1
                                      down vote













                                      I found a very easy answer. Dates were formatted 10.11.2018 and were not being recognised as dates. having first formatted the column as dates, I did a Ctrl-H search and replace of "." with "/". All dates were instantly recognised.






                                      share|improve this answer




























                                        up vote
                                        -2
                                        down vote













                                        I usually just create an extra column for sorting or totaling purposes so use year(a1)&if len(month(a1))=1,),"")&month(a1)&day(a1).



                                        That will provide a yyyymmdd result that can be sorted. Using the len(a1) just allows an extra zero to be added for months 1-9.






                                        share|improve this answer



















                                        • 2




                                          This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                          – CallumDA
                                          Sep 26 '14 at 11:59













                                        Your Answer








                                        StackExchange.ready(function() {
                                        var channelOptions = {
                                        tags: "".split(" "),
                                        id: "3"
                                        };
                                        initTagRenderer("".split(" "), "".split(" "), channelOptions);

                                        StackExchange.using("externalEditor", function() {
                                        // Have to fire editor after snippets, if snippets enabled
                                        if (StackExchange.settings.snippets.snippetsEnabled) {
                                        StackExchange.using("snippets", function() {
                                        createEditor();
                                        });
                                        }
                                        else {
                                        createEditor();
                                        }
                                        });

                                        function createEditor() {
                                        StackExchange.prepareEditor({
                                        heartbeatType: 'answer',
                                        convertImagesToLinks: true,
                                        noModals: true,
                                        showLowRepImageUploadWarning: true,
                                        reputationToPostImages: 10,
                                        bindNavPrevention: true,
                                        postfix: "",
                                        imageUploader: {
                                        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                                        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                                        allowUrls: true
                                        },
                                        onDemand: false,
                                        discardSelector: ".discard-answer"
                                        ,immediatelyShowMarkdownHelp:true
                                        });


                                        }
                                        });














                                         

                                        draft saved


                                        draft discarded


















                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f817110%2funable-to-get-excel-to-recognise-date-in-column%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown




















                                        StackExchange.ready(function () {
                                        $("#show-editor-button input, #show-editor-button button").click(function () {
                                        var showEditor = function() {
                                        $("#show-editor-button").hide();
                                        $("#post-form").removeClass("dno");
                                        StackExchange.editor.finallyInit();
                                        };

                                        var useFancy = $(this).data('confirm-use-fancy');
                                        if(useFancy == 'True') {
                                        var popupTitle = $(this).data('confirm-fancy-title');
                                        var popupBody = $(this).data('confirm-fancy-body');
                                        var popupAccept = $(this).data('confirm-fancy-accept-button');

                                        $(this).loadPopup({
                                        url: '/post/self-answer-popup',
                                        loaded: function(popup) {
                                        var pTitle = $(popup).find('h2');
                                        var pBody = $(popup).find('.popup-body');
                                        var pSubmit = $(popup).find('.popup-submit');

                                        pTitle.text(popupTitle);
                                        pBody.html(popupBody);
                                        pSubmit.val(popupAccept).click(showEditor);
                                        }
                                        })
                                        } else{
                                        var confirmText = $(this).data('confirm-text');
                                        if (confirmText ? confirm(confirmText) : true) {
                                        showEditor();
                                        }
                                        }
                                        });
                                        });






                                        29 Answers
                                        29






                                        active

                                        oldest

                                        votes








                                        29 Answers
                                        29






                                        active

                                        oldest

                                        votes









                                        active

                                        oldest

                                        votes






                                        active

                                        oldest

                                        votes








                                        up vote
                                        63
                                        down vote



                                        accepted










                                        The problem: Excel does not want to recognize dates as dates, even though through "Format cells - Number - Custom" you are explicitly trying to tell it these are dates by "mm/dd/yyyy". As you know; when excel has recognized something as a date, it further stores this as a number - such as "41004" but displays as date according to format you specify. To add to confusion excel may convert only part of your dates such as 08/04/2009, but leave other e.g. 07/28/2009 unconverted.



                                        Solution: steps 1 and then 2



                                        1) Select the date column. Under Data choose button Text to Columns. On first screen leave radio button on "delimited" and click Next. Unclick any of the delimiter boxes (any boxes blank; no checkmarks) and click Next. Under column data format choose Date and select MDY in the adjacent combo box and click Finish. Now you got date values (i.e. Excel has recognised your values as Date data type), but the formatting is likely still the locale date, not the mm/dd/yyyy you want.



                                        2) To get the desired US date format displayed properly you first need to select the column (if unselected) then under Cell Format - Number choose Date AND select Locale : English (US). This will give you format like "m/d/yy". Then you can select Custom and there you can either type "mm/dd/yyyy" or choose this from the list of custom strings.



                                        Alternative : use LibreOffice Calc. Upon pasting data from Patrick's post choose Paste Special (Ctrl+Shift+V) and choose Unformatted Text. This will open "Import Text" dialog box. Character set remains Unicode but for language choose English(USA); you should also check the box "Detect special numbers". Your dates immediately appear in the default US format and are date-sortable. If you wish the special US format MM/DD/YYYY you need to specify this once through "format Cells" - either before or after pasting.



                                        One might say - Excel should have recognised dates as soon as I told it via "Cell Format" and I couldn't agree more. Unfortunately it is only through step 1 from above that I have been able to make Excel recognize these text strings as dates. Obviously if you do this a lot it is pain in the neck and you might put together a visual basic routine that would do this for you at a push of a button.






                                        share|improve this answer























                                        • I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
                                          – Patrick
                                          Sep 26 '14 at 15:05










                                        • Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
                                          – r0berts
                                          Sep 26 '14 at 16:28










                                        • I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
                                          – Patrick
                                          Apr 8 '15 at 16:20










                                        • Suggestion 1 works like a charm. thanks.
                                          – Adam
                                          Dec 1 '17 at 15:28










                                        • Really good answer!!!
                                          – Adders
                                          May 17 at 14:35















                                        up vote
                                        63
                                        down vote



                                        accepted










                                        The problem: Excel does not want to recognize dates as dates, even though through "Format cells - Number - Custom" you are explicitly trying to tell it these are dates by "mm/dd/yyyy". As you know; when excel has recognized something as a date, it further stores this as a number - such as "41004" but displays as date according to format you specify. To add to confusion excel may convert only part of your dates such as 08/04/2009, but leave other e.g. 07/28/2009 unconverted.



                                        Solution: steps 1 and then 2



                                        1) Select the date column. Under Data choose button Text to Columns. On first screen leave radio button on "delimited" and click Next. Unclick any of the delimiter boxes (any boxes blank; no checkmarks) and click Next. Under column data format choose Date and select MDY in the adjacent combo box and click Finish. Now you got date values (i.e. Excel has recognised your values as Date data type), but the formatting is likely still the locale date, not the mm/dd/yyyy you want.



                                        2) To get the desired US date format displayed properly you first need to select the column (if unselected) then under Cell Format - Number choose Date AND select Locale : English (US). This will give you format like "m/d/yy". Then you can select Custom and there you can either type "mm/dd/yyyy" or choose this from the list of custom strings.



                                        Alternative : use LibreOffice Calc. Upon pasting data from Patrick's post choose Paste Special (Ctrl+Shift+V) and choose Unformatted Text. This will open "Import Text" dialog box. Character set remains Unicode but for language choose English(USA); you should also check the box "Detect special numbers". Your dates immediately appear in the default US format and are date-sortable. If you wish the special US format MM/DD/YYYY you need to specify this once through "format Cells" - either before or after pasting.



                                        One might say - Excel should have recognised dates as soon as I told it via "Cell Format" and I couldn't agree more. Unfortunately it is only through step 1 from above that I have been able to make Excel recognize these text strings as dates. Obviously if you do this a lot it is pain in the neck and you might put together a visual basic routine that would do this for you at a push of a button.






                                        share|improve this answer























                                        • I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
                                          – Patrick
                                          Sep 26 '14 at 15:05










                                        • Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
                                          – r0berts
                                          Sep 26 '14 at 16:28










                                        • I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
                                          – Patrick
                                          Apr 8 '15 at 16:20










                                        • Suggestion 1 works like a charm. thanks.
                                          – Adam
                                          Dec 1 '17 at 15:28










                                        • Really good answer!!!
                                          – Adders
                                          May 17 at 14:35













                                        up vote
                                        63
                                        down vote



                                        accepted







                                        up vote
                                        63
                                        down vote



                                        accepted






                                        The problem: Excel does not want to recognize dates as dates, even though through "Format cells - Number - Custom" you are explicitly trying to tell it these are dates by "mm/dd/yyyy". As you know; when excel has recognized something as a date, it further stores this as a number - such as "41004" but displays as date according to format you specify. To add to confusion excel may convert only part of your dates such as 08/04/2009, but leave other e.g. 07/28/2009 unconverted.



                                        Solution: steps 1 and then 2



                                        1) Select the date column. Under Data choose button Text to Columns. On first screen leave radio button on "delimited" and click Next. Unclick any of the delimiter boxes (any boxes blank; no checkmarks) and click Next. Under column data format choose Date and select MDY in the adjacent combo box and click Finish. Now you got date values (i.e. Excel has recognised your values as Date data type), but the formatting is likely still the locale date, not the mm/dd/yyyy you want.



                                        2) To get the desired US date format displayed properly you first need to select the column (if unselected) then under Cell Format - Number choose Date AND select Locale : English (US). This will give you format like "m/d/yy". Then you can select Custom and there you can either type "mm/dd/yyyy" or choose this from the list of custom strings.



                                        Alternative : use LibreOffice Calc. Upon pasting data from Patrick's post choose Paste Special (Ctrl+Shift+V) and choose Unformatted Text. This will open "Import Text" dialog box. Character set remains Unicode but for language choose English(USA); you should also check the box "Detect special numbers". Your dates immediately appear in the default US format and are date-sortable. If you wish the special US format MM/DD/YYYY you need to specify this once through "format Cells" - either before or after pasting.



                                        One might say - Excel should have recognised dates as soon as I told it via "Cell Format" and I couldn't agree more. Unfortunately it is only through step 1 from above that I have been able to make Excel recognize these text strings as dates. Obviously if you do this a lot it is pain in the neck and you might put together a visual basic routine that would do this for you at a push of a button.






                                        share|improve this answer














                                        The problem: Excel does not want to recognize dates as dates, even though through "Format cells - Number - Custom" you are explicitly trying to tell it these are dates by "mm/dd/yyyy". As you know; when excel has recognized something as a date, it further stores this as a number - such as "41004" but displays as date according to format you specify. To add to confusion excel may convert only part of your dates such as 08/04/2009, but leave other e.g. 07/28/2009 unconverted.



                                        Solution: steps 1 and then 2



                                        1) Select the date column. Under Data choose button Text to Columns. On first screen leave radio button on "delimited" and click Next. Unclick any of the delimiter boxes (any boxes blank; no checkmarks) and click Next. Under column data format choose Date and select MDY in the adjacent combo box and click Finish. Now you got date values (i.e. Excel has recognised your values as Date data type), but the formatting is likely still the locale date, not the mm/dd/yyyy you want.



                                        2) To get the desired US date format displayed properly you first need to select the column (if unselected) then under Cell Format - Number choose Date AND select Locale : English (US). This will give you format like "m/d/yy". Then you can select Custom and there you can either type "mm/dd/yyyy" or choose this from the list of custom strings.



                                        Alternative : use LibreOffice Calc. Upon pasting data from Patrick's post choose Paste Special (Ctrl+Shift+V) and choose Unformatted Text. This will open "Import Text" dialog box. Character set remains Unicode but for language choose English(USA); you should also check the box "Detect special numbers". Your dates immediately appear in the default US format and are date-sortable. If you wish the special US format MM/DD/YYYY you need to specify this once through "format Cells" - either before or after pasting.



                                        One might say - Excel should have recognised dates as soon as I told it via "Cell Format" and I couldn't agree more. Unfortunately it is only through step 1 from above that I have been able to make Excel recognize these text strings as dates. Obviously if you do this a lot it is pain in the neck and you might put together a visual basic routine that would do this for you at a push of a button.







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Sep 26 '14 at 16:44

























                                        answered Sep 26 '14 at 12:49









                                        r0berts

                                        1,458714




                                        1,458714












                                        • I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
                                          – Patrick
                                          Sep 26 '14 at 15:05










                                        • Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
                                          – r0berts
                                          Sep 26 '14 at 16:28










                                        • I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
                                          – Patrick
                                          Apr 8 '15 at 16:20










                                        • Suggestion 1 works like a charm. thanks.
                                          – Adam
                                          Dec 1 '17 at 15:28










                                        • Really good answer!!!
                                          – Adders
                                          May 17 at 14:35


















                                        • I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
                                          – Patrick
                                          Sep 26 '14 at 15:05










                                        • Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
                                          – r0berts
                                          Sep 26 '14 at 16:28










                                        • I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
                                          – Patrick
                                          Apr 8 '15 at 16:20










                                        • Suggestion 1 works like a charm. thanks.
                                          – Adam
                                          Dec 1 '17 at 15:28










                                        • Really good answer!!!
                                          – Adders
                                          May 17 at 14:35
















                                        I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
                                        – Patrick
                                        Sep 26 '14 at 15:05




                                        I address both your points in my OP. Splitting the date values to columns (and then re-integrating in ISO format) is of course a possibility, but given that Excel has extensive built in date functions I'd like to be able to leverage them with the valid date data I have. Your second option is exactly as I describe what is not working for me.
                                        – Patrick
                                        Sep 26 '14 at 15:05












                                        Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
                                        – r0berts
                                        Sep 26 '14 at 16:28




                                        Dear Patrick, please read carefully. Or you can use Libre Office Calc - with your data this works straight away - you simply pre-format column for Date - English (USA) and upon pasting do "Paste Special" "Unformatted text" - just tell the dialog box that language is English(USA) and don't forget to check the box to recognize special numbers. In my answer I tried to hint as hard as I could that Excel is inconsistent with this (buggy) and you have to resort to these steps 1 and then 2 to achieve the result you want.
                                        – r0berts
                                        Sep 26 '14 at 16:28












                                        I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
                                        – Patrick
                                        Apr 8 '15 at 16:20




                                        I should indeed have read your question properly. Your first suggest does indeed work. You should have had the bounty. Thanks for your assistance.
                                        – Patrick
                                        Apr 8 '15 at 16:20












                                        Suggestion 1 works like a charm. thanks.
                                        – Adam
                                        Dec 1 '17 at 15:28




                                        Suggestion 1 works like a charm. thanks.
                                        – Adam
                                        Dec 1 '17 at 15:28












                                        Really good answer!!!
                                        – Adders
                                        May 17 at 14:35




                                        Really good answer!!!
                                        – Adders
                                        May 17 at 14:35












                                        up vote
                                        4
                                        down vote













                                        Select all the column and go to Locate and Replace and just replace "/" with /.






                                        share|improve this answer























                                        • Can you explain what this does to fix the problem?
                                          – fixer1234
                                          Aug 28 '15 at 20:26












                                        • This really worked and was easy. The replacement thing just remove the leading zeros
                                          – PedroGabriel
                                          Jul 7 '17 at 18:08















                                        up vote
                                        4
                                        down vote













                                        Select all the column and go to Locate and Replace and just replace "/" with /.






                                        share|improve this answer























                                        • Can you explain what this does to fix the problem?
                                          – fixer1234
                                          Aug 28 '15 at 20:26












                                        • This really worked and was easy. The replacement thing just remove the leading zeros
                                          – PedroGabriel
                                          Jul 7 '17 at 18:08













                                        up vote
                                        4
                                        down vote










                                        up vote
                                        4
                                        down vote









                                        Select all the column and go to Locate and Replace and just replace "/" with /.






                                        share|improve this answer














                                        Select all the column and go to Locate and Replace and just replace "/" with /.







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Aug 28 '15 at 20:18









                                        kenorb

                                        10.4k1576106




                                        10.4k1576106










                                        answered Aug 28 '15 at 17:14









                                        Jair Bressani

                                        391




                                        391












                                        • Can you explain what this does to fix the problem?
                                          – fixer1234
                                          Aug 28 '15 at 20:26












                                        • This really worked and was easy. The replacement thing just remove the leading zeros
                                          – PedroGabriel
                                          Jul 7 '17 at 18:08


















                                        • Can you explain what this does to fix the problem?
                                          – fixer1234
                                          Aug 28 '15 at 20:26












                                        • This really worked and was easy. The replacement thing just remove the leading zeros
                                          – PedroGabriel
                                          Jul 7 '17 at 18:08
















                                        Can you explain what this does to fix the problem?
                                        – fixer1234
                                        Aug 28 '15 at 20:26






                                        Can you explain what this does to fix the problem?
                                        – fixer1234
                                        Aug 28 '15 at 20:26














                                        This really worked and was easy. The replacement thing just remove the leading zeros
                                        – PedroGabriel
                                        Jul 7 '17 at 18:08




                                        This really worked and was easy. The replacement thing just remove the leading zeros
                                        – PedroGabriel
                                        Jul 7 '17 at 18:08










                                        up vote
                                        3
                                        down vote













                                        I had the exact same issue with dates in excel. The format matched the requirements for a date in excel, yet without editing each cell it would not recognise the date, and when you are dealing with thousands of rows it is not practical to manually edit each cell. Solution is to run a find and replace on the row of dates where i replaced the hypen with a hyphen. Excel runs through the column replacing like with like but the resulting factor is that it now recongnises the dates! FIXED!






                                        share|improve this answer

























                                          up vote
                                          3
                                          down vote













                                          I had the exact same issue with dates in excel. The format matched the requirements for a date in excel, yet without editing each cell it would not recognise the date, and when you are dealing with thousands of rows it is not practical to manually edit each cell. Solution is to run a find and replace on the row of dates where i replaced the hypen with a hyphen. Excel runs through the column replacing like with like but the resulting factor is that it now recongnises the dates! FIXED!






                                          share|improve this answer























                                            up vote
                                            3
                                            down vote










                                            up vote
                                            3
                                            down vote









                                            I had the exact same issue with dates in excel. The format matched the requirements for a date in excel, yet without editing each cell it would not recognise the date, and when you are dealing with thousands of rows it is not practical to manually edit each cell. Solution is to run a find and replace on the row of dates where i replaced the hypen with a hyphen. Excel runs through the column replacing like with like but the resulting factor is that it now recongnises the dates! FIXED!






                                            share|improve this answer












                                            I had the exact same issue with dates in excel. The format matched the requirements for a date in excel, yet without editing each cell it would not recognise the date, and when you are dealing with thousands of rows it is not practical to manually edit each cell. Solution is to run a find and replace on the row of dates where i replaced the hypen with a hyphen. Excel runs through the column replacing like with like but the resulting factor is that it now recongnises the dates! FIXED!







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Feb 22 '16 at 9:06









                                            Warren Rocchi

                                            311




                                            311






















                                                up vote
                                                3
                                                down vote













                                                This may not be relevant to the original questioner, but it may help someone else who is unable to sort a column of dates.



                                                I found that Excel would not recognise a column of dates which were all before 1900, insisting that they were a column of text (since 1/1/1900 has numeric equivalent 1, and negative numbers are apparently not allowed). So I did a general replace of all my dates (which were in the 1800s) to put them into the 1900s, e.g. 180 -> 190, 181 -> 191, etc. The sorting process then worked fine. Finally I did a replace the other way, e.g. 190 -> 180.



                                                Hope this helps some other historian out there.






                                                share|improve this answer

























                                                  up vote
                                                  3
                                                  down vote













                                                  This may not be relevant to the original questioner, but it may help someone else who is unable to sort a column of dates.



                                                  I found that Excel would not recognise a column of dates which were all before 1900, insisting that they were a column of text (since 1/1/1900 has numeric equivalent 1, and negative numbers are apparently not allowed). So I did a general replace of all my dates (which were in the 1800s) to put them into the 1900s, e.g. 180 -> 190, 181 -> 191, etc. The sorting process then worked fine. Finally I did a replace the other way, e.g. 190 -> 180.



                                                  Hope this helps some other historian out there.






                                                  share|improve this answer























                                                    up vote
                                                    3
                                                    down vote










                                                    up vote
                                                    3
                                                    down vote









                                                    This may not be relevant to the original questioner, but it may help someone else who is unable to sort a column of dates.



                                                    I found that Excel would not recognise a column of dates which were all before 1900, insisting that they were a column of text (since 1/1/1900 has numeric equivalent 1, and negative numbers are apparently not allowed). So I did a general replace of all my dates (which were in the 1800s) to put them into the 1900s, e.g. 180 -> 190, 181 -> 191, etc. The sorting process then worked fine. Finally I did a replace the other way, e.g. 190 -> 180.



                                                    Hope this helps some other historian out there.






                                                    share|improve this answer












                                                    This may not be relevant to the original questioner, but it may help someone else who is unable to sort a column of dates.



                                                    I found that Excel would not recognise a column of dates which were all before 1900, insisting that they were a column of text (since 1/1/1900 has numeric equivalent 1, and negative numbers are apparently not allowed). So I did a general replace of all my dates (which were in the 1800s) to put them into the 1900s, e.g. 180 -> 190, 181 -> 191, etc. The sorting process then worked fine. Finally I did a replace the other way, e.g. 190 -> 180.



                                                    Hope this helps some other historian out there.







                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered Jun 25 '17 at 9:14









                                                    Laurie Allen

                                                    311




                                                    311






















                                                        up vote
                                                        2
                                                        down vote













                                                        It seems that Excel does not recognize your dates as dates, it recognizes them text, hence you get the Sort options as A to Z. If you do it correctly, you should get something like this:



                                                        http://i.stack.imgur.com/Qb4Pj.png



                                                        Hence, it is important to ensure that Excel recognizes the date. The most simple way to do that, is use the shortcut CTRL+SHIFT+3.



                                                        Here's what I did to your data. I simply copied it from your post above and pasted it in excel. Then I applied the shortcut above, and I got the required sort option. Check the image.



                                                        http://i.stack.imgur.com/yAa6a.png






                                                        share|improve this answer



















                                                        • 2




                                                          Unfortunately that shortcut does not work for me.
                                                          – Patrick
                                                          Sep 26 '14 at 15:07










                                                        • What does the shortcut do in your system Patrick.
                                                          – Firee
                                                          Sep 29 '14 at 6:21






                                                        • 3




                                                          The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
                                                          – Patrick
                                                          Sep 29 '14 at 9:28










                                                        • The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
                                                          – Scott
                                                          Jun 3 '17 at 22:03












                                                        • (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
                                                          – Scott
                                                          Jun 3 '17 at 22:11















                                                        up vote
                                                        2
                                                        down vote













                                                        It seems that Excel does not recognize your dates as dates, it recognizes them text, hence you get the Sort options as A to Z. If you do it correctly, you should get something like this:



                                                        http://i.stack.imgur.com/Qb4Pj.png



                                                        Hence, it is important to ensure that Excel recognizes the date. The most simple way to do that, is use the shortcut CTRL+SHIFT+3.



                                                        Here's what I did to your data. I simply copied it from your post above and pasted it in excel. Then I applied the shortcut above, and I got the required sort option. Check the image.



                                                        http://i.stack.imgur.com/yAa6a.png






                                                        share|improve this answer



















                                                        • 2




                                                          Unfortunately that shortcut does not work for me.
                                                          – Patrick
                                                          Sep 26 '14 at 15:07










                                                        • What does the shortcut do in your system Patrick.
                                                          – Firee
                                                          Sep 29 '14 at 6:21






                                                        • 3




                                                          The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
                                                          – Patrick
                                                          Sep 29 '14 at 9:28










                                                        • The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
                                                          – Scott
                                                          Jun 3 '17 at 22:03












                                                        • (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
                                                          – Scott
                                                          Jun 3 '17 at 22:11













                                                        up vote
                                                        2
                                                        down vote










                                                        up vote
                                                        2
                                                        down vote









                                                        It seems that Excel does not recognize your dates as dates, it recognizes them text, hence you get the Sort options as A to Z. If you do it correctly, you should get something like this:



                                                        http://i.stack.imgur.com/Qb4Pj.png



                                                        Hence, it is important to ensure that Excel recognizes the date. The most simple way to do that, is use the shortcut CTRL+SHIFT+3.



                                                        Here's what I did to your data. I simply copied it from your post above and pasted it in excel. Then I applied the shortcut above, and I got the required sort option. Check the image.



                                                        http://i.stack.imgur.com/yAa6a.png






                                                        share|improve this answer














                                                        It seems that Excel does not recognize your dates as dates, it recognizes them text, hence you get the Sort options as A to Z. If you do it correctly, you should get something like this:



                                                        http://i.stack.imgur.com/Qb4Pj.png



                                                        Hence, it is important to ensure that Excel recognizes the date. The most simple way to do that, is use the shortcut CTRL+SHIFT+3.



                                                        Here's what I did to your data. I simply copied it from your post above and pasted it in excel. Then I applied the shortcut above, and I got the required sort option. Check the image.



                                                        http://i.stack.imgur.com/yAa6a.png







                                                        share|improve this answer














                                                        share|improve this answer



                                                        share|improve this answer








                                                        edited Sep 26 '14 at 11:45









                                                        CharlieRB

                                                        20.4k44389




                                                        20.4k44389










                                                        answered Sep 26 '14 at 11:41









                                                        Chainsaw

                                                        88128




                                                        88128








                                                        • 2




                                                          Unfortunately that shortcut does not work for me.
                                                          – Patrick
                                                          Sep 26 '14 at 15:07










                                                        • What does the shortcut do in your system Patrick.
                                                          – Firee
                                                          Sep 29 '14 at 6:21






                                                        • 3




                                                          The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
                                                          – Patrick
                                                          Sep 29 '14 at 9:28










                                                        • The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
                                                          – Scott
                                                          Jun 3 '17 at 22:03












                                                        • (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
                                                          – Scott
                                                          Jun 3 '17 at 22:11














                                                        • 2




                                                          Unfortunately that shortcut does not work for me.
                                                          – Patrick
                                                          Sep 26 '14 at 15:07










                                                        • What does the shortcut do in your system Patrick.
                                                          – Firee
                                                          Sep 29 '14 at 6:21






                                                        • 3




                                                          The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
                                                          – Patrick
                                                          Sep 29 '14 at 9:28










                                                        • The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
                                                          – Scott
                                                          Jun 3 '17 at 22:03












                                                        • (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
                                                          – Scott
                                                          Jun 3 '17 at 22:11








                                                        2




                                                        2




                                                        Unfortunately that shortcut does not work for me.
                                                        – Patrick
                                                        Sep 26 '14 at 15:07




                                                        Unfortunately that shortcut does not work for me.
                                                        – Patrick
                                                        Sep 26 '14 at 15:07












                                                        What does the shortcut do in your system Patrick.
                                                        – Firee
                                                        Sep 29 '14 at 6:21




                                                        What does the shortcut do in your system Patrick.
                                                        – Firee
                                                        Sep 29 '14 at 6:21




                                                        3




                                                        3




                                                        The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
                                                        – Patrick
                                                        Sep 29 '14 at 9:28




                                                        The shortcut doesn't seem to do anything at all. I've got several systems at my disposal running Office 2007, 2010 and 2013 and none of them react to the CTRL SHIFT 3 shortcut. CTRL 1 correctly pops up the 'format cell' dialogue.
                                                        – Patrick
                                                        Sep 29 '14 at 9:28












                                                        The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
                                                        – Scott
                                                        Jun 3 '17 at 22:03






                                                        The Ctrl+Shift+3 keyboard shortcut, referenced somewhat sloppily as “Ctrl+Shift+#” here, means “Applies the Date format with the day, month, and year.” in Excel 2007, 2010, 2013, and 2016. (Specifically, on my Excel 2013, it is “d-mmm-yy”.) The Microsoft document doesn’t explain that the cells must already contain … (Cont’d)
                                                        – Scott
                                                        Jun 3 '17 at 22:03














                                                        (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
                                                        – Scott
                                                        Jun 3 '17 at 22:11




                                                        (Cont’d) … values that Excel recognizes as date/time data, and it seems like nobody here has clearly explained that, since Patrick is in England, his version of Excel is recognizing strings like 04/08/2012, 04/09/2009, and 04/01/2010 as 4-Aug-2012, 4-Sep-2009, and 4-Jan-2010, respectively, and is treating 04/21/2011 as a text string (because there is no 21st month). Since some of the values are text (and some of the values, presumably, have actually been misinterpreted), formatting (such as by the Ctrl+Shift+3 keyboard shortcut) isn’t going to do any good.
                                                        – Scott
                                                        Jun 3 '17 at 22:11










                                                        up vote
                                                        2
                                                        down vote













                                                        I would suspect the issue is Excel not being able to understand the format... Although you select the Date format, it remains as Text.



                                                        You can test this easily: When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). Then review the format of your cells.



                                                        I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date (note the different formats in the below screen shot)!



                                                        enter image description here



                                                        There are work-arounds for this, but, none of them will be automated simply because you're exporting each time. I would suggest using VBa, where you can simply run a macro which converts from US to UK date format, but, this would mean copying and pasting the VBa into your sheet each time.



                                                        Alternatively, you create an Excel that reads the newly created exported Excel sheets (from exchange) and then execute the VBa to update the date format for you. I will assume the Exported Exchange Excel file will always have the same file name/directory and provide a working example:



                                                        So, create new Excel sheet, called ImportedData.xlsm (excel enabled). This is the file where we will import the Exported Exchange Excel file into!



                                                        Add this VBa to the ImportedData.xlsm file



                                                        Sub DoTheCopyBit()

                                                        Dim dateCol As String
                                                        dateCol = "A" 'UPDATE ME TO THE COLUMN OF THE DATE COLUMN

                                                        Dim directory As String, fileName As String, sheet As Worksheet, total As Integer

                                                        Application.ScreenUpdating = False
                                                        Application.DisplayAlerts = False

                                                        directory = "C:UsersDaveDesktop" 'UPDATE ME
                                                        fileName = Dir(directory & "ExportedExcel.xlsx") 'UPDATE ME (this is the Exchange exported file location)

                                                        Do While fileName <> ""

                                                        'MAKE SURE THE EXPORTED FILE IS OPEN
                                                        Workbooks.Open (directory & fileName)

                                                        Workbooks(fileName).Worksheets("Sheet1").Copy _

                                                        Workbooks(fileName).Close

                                                        fileName = Dir()

                                                        Loop

                                                        Application.ScreenUpdating = True
                                                        Application.DisplayAlerts = True

                                                        Dim row As Integer
                                                        row = 1
                                                        Dim i As Integer
                                                        Do While (Range(dateCol & row).Value <> "")

                                                        Dim splitty() As String
                                                        splitty = Split(Range(dateCol & row).Value, "/")
                                                        Range(dateCol & row).NumberFormat = "@"
                                                        Range(dateCol & row).Value = splitty(2) + "/" + splitty(0) + "/" + splitty(1)
                                                        Range(dateCol & row).NumberFormat = "yyyy-mm-dd"
                                                        row = row + 1
                                                        Loop


                                                        End Sub


                                                        What I also did was update the date format to yyyy-mm-dd because this way, even if Excel gives you the sort filter A-Z instead of newest values, it still works!



                                                        I'm sure the above code has bugs in but I obviously have no idea what type of data you have but I tested it with the a single column of dates (as you have) and it works fine for me!



                                                        How do I add VBA in MS Office?






                                                        share|improve this answer























                                                        • well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
                                                          – Patrick
                                                          Mar 17 '15 at 15:50















                                                        up vote
                                                        2
                                                        down vote













                                                        I would suspect the issue is Excel not being able to understand the format... Although you select the Date format, it remains as Text.



                                                        You can test this easily: When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). Then review the format of your cells.



                                                        I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date (note the different formats in the below screen shot)!



                                                        enter image description here



                                                        There are work-arounds for this, but, none of them will be automated simply because you're exporting each time. I would suggest using VBa, where you can simply run a macro which converts from US to UK date format, but, this would mean copying and pasting the VBa into your sheet each time.



                                                        Alternatively, you create an Excel that reads the newly created exported Excel sheets (from exchange) and then execute the VBa to update the date format for you. I will assume the Exported Exchange Excel file will always have the same file name/directory and provide a working example:



                                                        So, create new Excel sheet, called ImportedData.xlsm (excel enabled). This is the file where we will import the Exported Exchange Excel file into!



                                                        Add this VBa to the ImportedData.xlsm file



                                                        Sub DoTheCopyBit()

                                                        Dim dateCol As String
                                                        dateCol = "A" 'UPDATE ME TO THE COLUMN OF THE DATE COLUMN

                                                        Dim directory As String, fileName As String, sheet As Worksheet, total As Integer

                                                        Application.ScreenUpdating = False
                                                        Application.DisplayAlerts = False

                                                        directory = "C:UsersDaveDesktop" 'UPDATE ME
                                                        fileName = Dir(directory & "ExportedExcel.xlsx") 'UPDATE ME (this is the Exchange exported file location)

                                                        Do While fileName <> ""

                                                        'MAKE SURE THE EXPORTED FILE IS OPEN
                                                        Workbooks.Open (directory & fileName)

                                                        Workbooks(fileName).Worksheets("Sheet1").Copy _

                                                        Workbooks(fileName).Close

                                                        fileName = Dir()

                                                        Loop

                                                        Application.ScreenUpdating = True
                                                        Application.DisplayAlerts = True

                                                        Dim row As Integer
                                                        row = 1
                                                        Dim i As Integer
                                                        Do While (Range(dateCol & row).Value <> "")

                                                        Dim splitty() As String
                                                        splitty = Split(Range(dateCol & row).Value, "/")
                                                        Range(dateCol & row).NumberFormat = "@"
                                                        Range(dateCol & row).Value = splitty(2) + "/" + splitty(0) + "/" + splitty(1)
                                                        Range(dateCol & row).NumberFormat = "yyyy-mm-dd"
                                                        row = row + 1
                                                        Loop


                                                        End Sub


                                                        What I also did was update the date format to yyyy-mm-dd because this way, even if Excel gives you the sort filter A-Z instead of newest values, it still works!



                                                        I'm sure the above code has bugs in but I obviously have no idea what type of data you have but I tested it with the a single column of dates (as you have) and it works fine for me!



                                                        How do I add VBA in MS Office?






                                                        share|improve this answer























                                                        • well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
                                                          – Patrick
                                                          Mar 17 '15 at 15:50













                                                        up vote
                                                        2
                                                        down vote










                                                        up vote
                                                        2
                                                        down vote









                                                        I would suspect the issue is Excel not being able to understand the format... Although you select the Date format, it remains as Text.



                                                        You can test this easily: When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). Then review the format of your cells.



                                                        I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date (note the different formats in the below screen shot)!



                                                        enter image description here



                                                        There are work-arounds for this, but, none of them will be automated simply because you're exporting each time. I would suggest using VBa, where you can simply run a macro which converts from US to UK date format, but, this would mean copying and pasting the VBa into your sheet each time.



                                                        Alternatively, you create an Excel that reads the newly created exported Excel sheets (from exchange) and then execute the VBa to update the date format for you. I will assume the Exported Exchange Excel file will always have the same file name/directory and provide a working example:



                                                        So, create new Excel sheet, called ImportedData.xlsm (excel enabled). This is the file where we will import the Exported Exchange Excel file into!



                                                        Add this VBa to the ImportedData.xlsm file



                                                        Sub DoTheCopyBit()

                                                        Dim dateCol As String
                                                        dateCol = "A" 'UPDATE ME TO THE COLUMN OF THE DATE COLUMN

                                                        Dim directory As String, fileName As String, sheet As Worksheet, total As Integer

                                                        Application.ScreenUpdating = False
                                                        Application.DisplayAlerts = False

                                                        directory = "C:UsersDaveDesktop" 'UPDATE ME
                                                        fileName = Dir(directory & "ExportedExcel.xlsx") 'UPDATE ME (this is the Exchange exported file location)

                                                        Do While fileName <> ""

                                                        'MAKE SURE THE EXPORTED FILE IS OPEN
                                                        Workbooks.Open (directory & fileName)

                                                        Workbooks(fileName).Worksheets("Sheet1").Copy _

                                                        Workbooks(fileName).Close

                                                        fileName = Dir()

                                                        Loop

                                                        Application.ScreenUpdating = True
                                                        Application.DisplayAlerts = True

                                                        Dim row As Integer
                                                        row = 1
                                                        Dim i As Integer
                                                        Do While (Range(dateCol & row).Value <> "")

                                                        Dim splitty() As String
                                                        splitty = Split(Range(dateCol & row).Value, "/")
                                                        Range(dateCol & row).NumberFormat = "@"
                                                        Range(dateCol & row).Value = splitty(2) + "/" + splitty(0) + "/" + splitty(1)
                                                        Range(dateCol & row).NumberFormat = "yyyy-mm-dd"
                                                        row = row + 1
                                                        Loop


                                                        End Sub


                                                        What I also did was update the date format to yyyy-mm-dd because this way, even if Excel gives you the sort filter A-Z instead of newest values, it still works!



                                                        I'm sure the above code has bugs in but I obviously have no idea what type of data you have but I tested it with the a single column of dates (as you have) and it works fine for me!



                                                        How do I add VBA in MS Office?






                                                        share|improve this answer














                                                        I would suspect the issue is Excel not being able to understand the format... Although you select the Date format, it remains as Text.



                                                        You can test this easily: When you try to update the dates format, select the column and right click on it and choose format cells (as you already do) but choose the option 2001-03-14 (near bottom of the list). Then review the format of your cells.



                                                        I will suspect that only some of the date formats update correctly, indicating that Excel still treating it like a string, not a date (note the different formats in the below screen shot)!



                                                        enter image description here



                                                        There are work-arounds for this, but, none of them will be automated simply because you're exporting each time. I would suggest using VBa, where you can simply run a macro which converts from US to UK date format, but, this would mean copying and pasting the VBa into your sheet each time.



                                                        Alternatively, you create an Excel that reads the newly created exported Excel sheets (from exchange) and then execute the VBa to update the date format for you. I will assume the Exported Exchange Excel file will always have the same file name/directory and provide a working example:



                                                        So, create new Excel sheet, called ImportedData.xlsm (excel enabled). This is the file where we will import the Exported Exchange Excel file into!



                                                        Add this VBa to the ImportedData.xlsm file



                                                        Sub DoTheCopyBit()

                                                        Dim dateCol As String
                                                        dateCol = "A" 'UPDATE ME TO THE COLUMN OF THE DATE COLUMN

                                                        Dim directory As String, fileName As String, sheet As Worksheet, total As Integer

                                                        Application.ScreenUpdating = False
                                                        Application.DisplayAlerts = False

                                                        directory = "C:UsersDaveDesktop" 'UPDATE ME
                                                        fileName = Dir(directory & "ExportedExcel.xlsx") 'UPDATE ME (this is the Exchange exported file location)

                                                        Do While fileName <> ""

                                                        'MAKE SURE THE EXPORTED FILE IS OPEN
                                                        Workbooks.Open (directory & fileName)

                                                        Workbooks(fileName).Worksheets("Sheet1").Copy _

                                                        Workbooks(fileName).Close

                                                        fileName = Dir()

                                                        Loop

                                                        Application.ScreenUpdating = True
                                                        Application.DisplayAlerts = True

                                                        Dim row As Integer
                                                        row = 1
                                                        Dim i As Integer
                                                        Do While (Range(dateCol & row).Value <> "")

                                                        Dim splitty() As String
                                                        splitty = Split(Range(dateCol & row).Value, "/")
                                                        Range(dateCol & row).NumberFormat = "@"
                                                        Range(dateCol & row).Value = splitty(2) + "/" + splitty(0) + "/" + splitty(1)
                                                        Range(dateCol & row).NumberFormat = "yyyy-mm-dd"
                                                        row = row + 1
                                                        Loop


                                                        End Sub


                                                        What I also did was update the date format to yyyy-mm-dd because this way, even if Excel gives you the sort filter A-Z instead of newest values, it still works!



                                                        I'm sure the above code has bugs in but I obviously have no idea what type of data you have but I tested it with the a single column of dates (as you have) and it works fine for me!



                                                        How do I add VBA in MS Office?







                                                        share|improve this answer














                                                        share|improve this answer



                                                        share|improve this answer








                                                        edited Mar 20 '17 at 10:16









                                                        Community

                                                        1




                                                        1










                                                        answered Mar 17 '15 at 9:14









                                                        Dave

                                                        23.2k74361




                                                        23.2k74361












                                                        • well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
                                                          – Patrick
                                                          Mar 17 '15 at 15:50


















                                                        • well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
                                                          – Patrick
                                                          Mar 17 '15 at 15:50
















                                                        well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
                                                        – Patrick
                                                        Mar 17 '15 at 15:50




                                                        well... I'm going to leave this for a couple of days to give it a bit of extra exposure but this looks like a solid answer. This is absolutely crazy though, I can't beleive this is needed. As it is I've fixed the data at source with a small function in powershell to flip it round to ISO format at which point I don't care if Excel recognises it as a date :/
                                                        – Patrick
                                                        Mar 17 '15 at 15:50










                                                        up vote
                                                        2
                                                        down vote













                                                        https://support.office.com/en-us/article/Convert-dates-stored-as-text-to-dates-8df7663e-98e6-4295-96e4-32a67ec0a680



                                                        Simple solution here - create new column use =datevalue(cell) formula then copy the formula into your other rows- a few seconds to fix






                                                        share|improve this answer

























                                                          up vote
                                                          2
                                                          down vote













                                                          https://support.office.com/en-us/article/Convert-dates-stored-as-text-to-dates-8df7663e-98e6-4295-96e4-32a67ec0a680



                                                          Simple solution here - create new column use =datevalue(cell) formula then copy the formula into your other rows- a few seconds to fix






                                                          share|improve this answer























                                                            up vote
                                                            2
                                                            down vote










                                                            up vote
                                                            2
                                                            down vote









                                                            https://support.office.com/en-us/article/Convert-dates-stored-as-text-to-dates-8df7663e-98e6-4295-96e4-32a67ec0a680



                                                            Simple solution here - create new column use =datevalue(cell) formula then copy the formula into your other rows- a few seconds to fix






                                                            share|improve this answer












                                                            https://support.office.com/en-us/article/Convert-dates-stored-as-text-to-dates-8df7663e-98e6-4295-96e4-32a67ec0a680



                                                            Simple solution here - create new column use =datevalue(cell) formula then copy the formula into your other rows- a few seconds to fix







                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Jun 23 '16 at 23:35









                                                            Mike

                                                            211




                                                            211






















                                                                up vote
                                                                2
                                                                down vote













                                                                I was dealing with a similar issue with thousands of rows extracted out of a SAP database and, inexplicably, two different date formats in the same date column (most being our standard "YYYY-MM-DD" but about 10% being "MM-DD-YYY"). Manually editing 650 rows once every month was not an option.



                                                                None (zero... 0... nil) of the options above worked. Yes, I tried them all. Copying to a text file or explicitly exporting to txt still, somehow, had no effect on the format (or lack therefo) of the 10% dates that simply sat in their corner refusing to behave.



                                                                The only way I was able to fix it was to insert a blank column to the right of the misbehaving date column and using the following, rather simplistic formula:



                                                                (assuming your misbehaving data is in Column D)



                                                                =IF(MID(D2,3,1)="-",DATEVALUE(TEXT(CONCATENATE(RIGHT(D2,4),"-",LEFT(D2,5)),"YYYY-MM-DD")),DATEVALUE(TEXT(D2,"YYYY-MM-DD")))



                                                                I could then copy the results in my new, calculated column over top of the misbehaving dates by pasting "Values" only after which I could delete my calculated column.






                                                                share|improve this answer



























                                                                  up vote
                                                                  2
                                                                  down vote













                                                                  I was dealing with a similar issue with thousands of rows extracted out of a SAP database and, inexplicably, two different date formats in the same date column (most being our standard "YYYY-MM-DD" but about 10% being "MM-DD-YYY"). Manually editing 650 rows once every month was not an option.



                                                                  None (zero... 0... nil) of the options above worked. Yes, I tried them all. Copying to a text file or explicitly exporting to txt still, somehow, had no effect on the format (or lack therefo) of the 10% dates that simply sat in their corner refusing to behave.



                                                                  The only way I was able to fix it was to insert a blank column to the right of the misbehaving date column and using the following, rather simplistic formula:



                                                                  (assuming your misbehaving data is in Column D)



                                                                  =IF(MID(D2,3,1)="-",DATEVALUE(TEXT(CONCATENATE(RIGHT(D2,4),"-",LEFT(D2,5)),"YYYY-MM-DD")),DATEVALUE(TEXT(D2,"YYYY-MM-DD")))



                                                                  I could then copy the results in my new, calculated column over top of the misbehaving dates by pasting "Values" only after which I could delete my calculated column.






                                                                  share|improve this answer

























                                                                    up vote
                                                                    2
                                                                    down vote










                                                                    up vote
                                                                    2
                                                                    down vote









                                                                    I was dealing with a similar issue with thousands of rows extracted out of a SAP database and, inexplicably, two different date formats in the same date column (most being our standard "YYYY-MM-DD" but about 10% being "MM-DD-YYY"). Manually editing 650 rows once every month was not an option.



                                                                    None (zero... 0... nil) of the options above worked. Yes, I tried them all. Copying to a text file or explicitly exporting to txt still, somehow, had no effect on the format (or lack therefo) of the 10% dates that simply sat in their corner refusing to behave.



                                                                    The only way I was able to fix it was to insert a blank column to the right of the misbehaving date column and using the following, rather simplistic formula:



                                                                    (assuming your misbehaving data is in Column D)



                                                                    =IF(MID(D2,3,1)="-",DATEVALUE(TEXT(CONCATENATE(RIGHT(D2,4),"-",LEFT(D2,5)),"YYYY-MM-DD")),DATEVALUE(TEXT(D2,"YYYY-MM-DD")))



                                                                    I could then copy the results in my new, calculated column over top of the misbehaving dates by pasting "Values" only after which I could delete my calculated column.






                                                                    share|improve this answer














                                                                    I was dealing with a similar issue with thousands of rows extracted out of a SAP database and, inexplicably, two different date formats in the same date column (most being our standard "YYYY-MM-DD" but about 10% being "MM-DD-YYY"). Manually editing 650 rows once every month was not an option.



                                                                    None (zero... 0... nil) of the options above worked. Yes, I tried them all. Copying to a text file or explicitly exporting to txt still, somehow, had no effect on the format (or lack therefo) of the 10% dates that simply sat in their corner refusing to behave.



                                                                    The only way I was able to fix it was to insert a blank column to the right of the misbehaving date column and using the following, rather simplistic formula:



                                                                    (assuming your misbehaving data is in Column D)



                                                                    =IF(MID(D2,3,1)="-",DATEVALUE(TEXT(CONCATENATE(RIGHT(D2,4),"-",LEFT(D2,5)),"YYYY-MM-DD")),DATEVALUE(TEXT(D2,"YYYY-MM-DD")))



                                                                    I could then copy the results in my new, calculated column over top of the misbehaving dates by pasting "Values" only after which I could delete my calculated column.







                                                                    share|improve this answer














                                                                    share|improve this answer



                                                                    share|improve this answer








                                                                    edited Apr 10 '17 at 22:29









                                                                    bertieb

                                                                    5,477102141




                                                                    5,477102141










                                                                    answered Apr 10 '17 at 21:49









                                                                    Lucster

                                                                    211




                                                                    211






















                                                                        up vote
                                                                        1
                                                                        down vote













                                                                        I figured it out!



                                                                        There is a space at the beginning and at the end of the date.




                                                                        1. If you use find and replace and press the spacebar, it WILL NOT
                                                                          work.

                                                                        2. You have to click right before the month number, press shift
                                                                          and the left arrow to select and copy. Sometimes you need to use the
                                                                          mouse to select the space.

                                                                        3. Then paste this as the space in find and
                                                                          replace and all your dates will become dates.

                                                                        4. If there is space and date Select Data>Go to Data>Text to
                                                                          columns>Delimited>Space as separator and then finish.

                                                                        5. All spaces will be removed.






                                                                        share|improve this answer























                                                                        • The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
                                                                          – Patrick
                                                                          Nov 17 '15 at 11:54















                                                                        up vote
                                                                        1
                                                                        down vote













                                                                        I figured it out!



                                                                        There is a space at the beginning and at the end of the date.




                                                                        1. If you use find and replace and press the spacebar, it WILL NOT
                                                                          work.

                                                                        2. You have to click right before the month number, press shift
                                                                          and the left arrow to select and copy. Sometimes you need to use the
                                                                          mouse to select the space.

                                                                        3. Then paste this as the space in find and
                                                                          replace and all your dates will become dates.

                                                                        4. If there is space and date Select Data>Go to Data>Text to
                                                                          columns>Delimited>Space as separator and then finish.

                                                                        5. All spaces will be removed.






                                                                        share|improve this answer























                                                                        • The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
                                                                          – Patrick
                                                                          Nov 17 '15 at 11:54













                                                                        up vote
                                                                        1
                                                                        down vote










                                                                        up vote
                                                                        1
                                                                        down vote









                                                                        I figured it out!



                                                                        There is a space at the beginning and at the end of the date.




                                                                        1. If you use find and replace and press the spacebar, it WILL NOT
                                                                          work.

                                                                        2. You have to click right before the month number, press shift
                                                                          and the left arrow to select and copy. Sometimes you need to use the
                                                                          mouse to select the space.

                                                                        3. Then paste this as the space in find and
                                                                          replace and all your dates will become dates.

                                                                        4. If there is space and date Select Data>Go to Data>Text to
                                                                          columns>Delimited>Space as separator and then finish.

                                                                        5. All spaces will be removed.






                                                                        share|improve this answer














                                                                        I figured it out!



                                                                        There is a space at the beginning and at the end of the date.




                                                                        1. If you use find and replace and press the spacebar, it WILL NOT
                                                                          work.

                                                                        2. You have to click right before the month number, press shift
                                                                          and the left arrow to select and copy. Sometimes you need to use the
                                                                          mouse to select the space.

                                                                        3. Then paste this as the space in find and
                                                                          replace and all your dates will become dates.

                                                                        4. If there is space and date Select Data>Go to Data>Text to
                                                                          columns>Delimited>Space as separator and then finish.

                                                                        5. All spaces will be removed.







                                                                        share|improve this answer














                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        edited May 16 '17 at 9:47









                                                                        djsmiley2k

                                                                        4,78712335




                                                                        4,78712335










                                                                        answered May 14 '15 at 16:46









                                                                        JailDoctor

                                                                        112




                                                                        112












                                                                        • The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
                                                                          – Patrick
                                                                          Nov 17 '15 at 11:54


















                                                                        • The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
                                                                          – Patrick
                                                                          Nov 17 '15 at 11:54
















                                                                        The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
                                                                        – Patrick
                                                                        Nov 17 '15 at 11:54




                                                                        The reason the find and replace won't work with the spacebar is that the gap is most likely a tab.
                                                                        – Patrick
                                                                        Nov 17 '15 at 11:54










                                                                        up vote
                                                                        0
                                                                        down vote













                                                                        If Excel stubbornly refuses to recognize your column as date, replace it by another :




                                                                        • Add a new column to the right of the old column

                                                                        • Right-click the new column and select Format

                                                                        • Set the format to date

                                                                        • Highlight the entire old column and copy it

                                                                        • Highlight the top cell of the new column and select Paste Special, and only paste values

                                                                        • You can now remove the old column.






                                                                        share|improve this answer























                                                                        • I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
                                                                          – Patrick
                                                                          Mar 17 '15 at 15:42










                                                                        • Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
                                                                          – harrymc
                                                                          Mar 18 '15 at 8:24

















                                                                        up vote
                                                                        0
                                                                        down vote













                                                                        If Excel stubbornly refuses to recognize your column as date, replace it by another :




                                                                        • Add a new column to the right of the old column

                                                                        • Right-click the new column and select Format

                                                                        • Set the format to date

                                                                        • Highlight the entire old column and copy it

                                                                        • Highlight the top cell of the new column and select Paste Special, and only paste values

                                                                        • You can now remove the old column.






                                                                        share|improve this answer























                                                                        • I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
                                                                          – Patrick
                                                                          Mar 17 '15 at 15:42










                                                                        • Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
                                                                          – harrymc
                                                                          Mar 18 '15 at 8:24















                                                                        up vote
                                                                        0
                                                                        down vote










                                                                        up vote
                                                                        0
                                                                        down vote









                                                                        If Excel stubbornly refuses to recognize your column as date, replace it by another :




                                                                        • Add a new column to the right of the old column

                                                                        • Right-click the new column and select Format

                                                                        • Set the format to date

                                                                        • Highlight the entire old column and copy it

                                                                        • Highlight the top cell of the new column and select Paste Special, and only paste values

                                                                        • You can now remove the old column.






                                                                        share|improve this answer














                                                                        If Excel stubbornly refuses to recognize your column as date, replace it by another :




                                                                        • Add a new column to the right of the old column

                                                                        • Right-click the new column and select Format

                                                                        • Set the format to date

                                                                        • Highlight the entire old column and copy it

                                                                        • Highlight the top cell of the new column and select Paste Special, and only paste values

                                                                        • You can now remove the old column.







                                                                        share|improve this answer














                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        answered Mar 17 '15 at 10:01


























                                                                        community wiki





                                                                        harrymc













                                                                        • I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
                                                                          – Patrick
                                                                          Mar 17 '15 at 15:42










                                                                        • Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
                                                                          – harrymc
                                                                          Mar 18 '15 at 8:24




















                                                                        • I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
                                                                          – Patrick
                                                                          Mar 17 '15 at 15:42










                                                                        • Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
                                                                          – harrymc
                                                                          Mar 18 '15 at 8:24


















                                                                        I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
                                                                        – Patrick
                                                                        Mar 17 '15 at 15:42




                                                                        I've tried this, it behaves the same with the new column. See Dave's answer, the screen cap at the top is what I get not matter how many times I move it between columns.
                                                                        – Patrick
                                                                        Mar 17 '15 at 15:42












                                                                        Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
                                                                        – harrymc
                                                                        Mar 18 '15 at 8:24






                                                                        Try to force the issue by using the DATEVALUE(old column) function in the formula on the new column, then use the Number formatting dropdown list on the Home ribbon bar to choose Short/Long Date.
                                                                        – harrymc
                                                                        Mar 18 '15 at 8:24












                                                                        up vote
                                                                        0
                                                                        down vote













                                                                        Had similar problem, tried formatting the data as date but to no avail. Then I realized there was a leading space in the date, edited the field and removed the space - hey presto everything ok. Not great for large amounts of data, but thinking about it further I could have maybe checked it and edited the data in Wordpad or a similar editor.






                                                                        share|improve this answer

























                                                                          up vote
                                                                          0
                                                                          down vote













                                                                          Had similar problem, tried formatting the data as date but to no avail. Then I realized there was a leading space in the date, edited the field and removed the space - hey presto everything ok. Not great for large amounts of data, but thinking about it further I could have maybe checked it and edited the data in Wordpad or a similar editor.






                                                                          share|improve this answer























                                                                            up vote
                                                                            0
                                                                            down vote










                                                                            up vote
                                                                            0
                                                                            down vote









                                                                            Had similar problem, tried formatting the data as date but to no avail. Then I realized there was a leading space in the date, edited the field and removed the space - hey presto everything ok. Not great for large amounts of data, but thinking about it further I could have maybe checked it and edited the data in Wordpad or a similar editor.






                                                                            share|improve this answer












                                                                            Had similar problem, tried formatting the data as date but to no avail. Then I realized there was a leading space in the date, edited the field and removed the space - hey presto everything ok. Not great for large amounts of data, but thinking about it further I could have maybe checked it and edited the data in Wordpad or a similar editor.







                                                                            share|improve this answer












                                                                            share|improve this answer



                                                                            share|improve this answer










                                                                            answered Sep 1 '15 at 9:34









                                                                            Mark Hogan

                                                                            1




                                                                            1






















                                                                                up vote
                                                                                0
                                                                                down vote













                                                                                I just simply copied the number 1 (one) and multiplied it to the date column (data) using the PASTE SPECIAL function. It then changes to General formating i.e 42102
                                                                                Then go apply Date on the formating and it now recognises it as a date.



                                                                                Hope this helps






                                                                                share|improve this answer

























                                                                                  up vote
                                                                                  0
                                                                                  down vote













                                                                                  I just simply copied the number 1 (one) and multiplied it to the date column (data) using the PASTE SPECIAL function. It then changes to General formating i.e 42102
                                                                                  Then go apply Date on the formating and it now recognises it as a date.



                                                                                  Hope this helps






                                                                                  share|improve this answer























                                                                                    up vote
                                                                                    0
                                                                                    down vote










                                                                                    up vote
                                                                                    0
                                                                                    down vote









                                                                                    I just simply copied the number 1 (one) and multiplied it to the date column (data) using the PASTE SPECIAL function. It then changes to General formating i.e 42102
                                                                                    Then go apply Date on the formating and it now recognises it as a date.



                                                                                    Hope this helps






                                                                                    share|improve this answer












                                                                                    I just simply copied the number 1 (one) and multiplied it to the date column (data) using the PASTE SPECIAL function. It then changes to General formating i.e 42102
                                                                                    Then go apply Date on the formating and it now recognises it as a date.



                                                                                    Hope this helps







                                                                                    share|improve this answer












                                                                                    share|improve this answer



                                                                                    share|improve this answer










                                                                                    answered Nov 17 '15 at 8:03









                                                                                    Mpho Sehlako

                                                                                    1




                                                                                    1






















                                                                                        up vote
                                                                                        0
                                                                                        down vote













                                                                                        All the above solutions - including r0berts - were unsuccessful, but found this bizarre solution which turned out to be the fastest fix.



                                                                                        I was trying to sort "dates" on a downloaded spreadsheet of account transactions.



                                                                                        This had been downloaded via CHROME browser. No amount of manipulation of the "dates" would get them recognised as old-to-new sortable.



                                                                                        But, then I downloaded via INTERNET EXPLORER browser - amazing - I could sort instantly without touching a column.



                                                                                        I cannot explain why different browsers affect the formatting of data, except that it clearly did and was a very fast fix.






                                                                                        share|improve this answer

























                                                                                          up vote
                                                                                          0
                                                                                          down vote













                                                                                          All the above solutions - including r0berts - were unsuccessful, but found this bizarre solution which turned out to be the fastest fix.



                                                                                          I was trying to sort "dates" on a downloaded spreadsheet of account transactions.



                                                                                          This had been downloaded via CHROME browser. No amount of manipulation of the "dates" would get them recognised as old-to-new sortable.



                                                                                          But, then I downloaded via INTERNET EXPLORER browser - amazing - I could sort instantly without touching a column.



                                                                                          I cannot explain why different browsers affect the formatting of data, except that it clearly did and was a very fast fix.






                                                                                          share|improve this answer























                                                                                            up vote
                                                                                            0
                                                                                            down vote










                                                                                            up vote
                                                                                            0
                                                                                            down vote









                                                                                            All the above solutions - including r0berts - were unsuccessful, but found this bizarre solution which turned out to be the fastest fix.



                                                                                            I was trying to sort "dates" on a downloaded spreadsheet of account transactions.



                                                                                            This had been downloaded via CHROME browser. No amount of manipulation of the "dates" would get them recognised as old-to-new sortable.



                                                                                            But, then I downloaded via INTERNET EXPLORER browser - amazing - I could sort instantly without touching a column.



                                                                                            I cannot explain why different browsers affect the formatting of data, except that it clearly did and was a very fast fix.






                                                                                            share|improve this answer












                                                                                            All the above solutions - including r0berts - were unsuccessful, but found this bizarre solution which turned out to be the fastest fix.



                                                                                            I was trying to sort "dates" on a downloaded spreadsheet of account transactions.



                                                                                            This had been downloaded via CHROME browser. No amount of manipulation of the "dates" would get them recognised as old-to-new sortable.



                                                                                            But, then I downloaded via INTERNET EXPLORER browser - amazing - I could sort instantly without touching a column.



                                                                                            I cannot explain why different browsers affect the formatting of data, except that it clearly did and was a very fast fix.







                                                                                            share|improve this answer












                                                                                            share|improve this answer



                                                                                            share|improve this answer










                                                                                            answered Apr 24 '16 at 1:24









                                                                                            Ros

                                                                                            1




                                                                                            1






















                                                                                                up vote
                                                                                                0
                                                                                                down vote













                                                                                                My solution in the UK - I had my dates with dots in them like this:



                                                                                                03.01.17


                                                                                                I solved this with the following:




                                                                                                1. Highlight the whole column.

                                                                                                2. Go to find and select/ replace.

                                                                                                3. I replaced all the full stops with middle dash eg 03.01.17 03-01-17.

                                                                                                4. Keep the column highlighted.

                                                                                                5. Format cells, number tab select date.

                                                                                                6. Use the Type 14-03-12 (essential for mine to have the middle dash)

                                                                                                7. Locale English (United Kingdom)


                                                                                                When sorting the column all dates for the year are sorted.






                                                                                                share|improve this answer



























                                                                                                  up vote
                                                                                                  0
                                                                                                  down vote













                                                                                                  My solution in the UK - I had my dates with dots in them like this:



                                                                                                  03.01.17


                                                                                                  I solved this with the following:




                                                                                                  1. Highlight the whole column.

                                                                                                  2. Go to find and select/ replace.

                                                                                                  3. I replaced all the full stops with middle dash eg 03.01.17 03-01-17.

                                                                                                  4. Keep the column highlighted.

                                                                                                  5. Format cells, number tab select date.

                                                                                                  6. Use the Type 14-03-12 (essential for mine to have the middle dash)

                                                                                                  7. Locale English (United Kingdom)


                                                                                                  When sorting the column all dates for the year are sorted.






                                                                                                  share|improve this answer

























                                                                                                    up vote
                                                                                                    0
                                                                                                    down vote










                                                                                                    up vote
                                                                                                    0
                                                                                                    down vote









                                                                                                    My solution in the UK - I had my dates with dots in them like this:



                                                                                                    03.01.17


                                                                                                    I solved this with the following:




                                                                                                    1. Highlight the whole column.

                                                                                                    2. Go to find and select/ replace.

                                                                                                    3. I replaced all the full stops with middle dash eg 03.01.17 03-01-17.

                                                                                                    4. Keep the column highlighted.

                                                                                                    5. Format cells, number tab select date.

                                                                                                    6. Use the Type 14-03-12 (essential for mine to have the middle dash)

                                                                                                    7. Locale English (United Kingdom)


                                                                                                    When sorting the column all dates for the year are sorted.






                                                                                                    share|improve this answer














                                                                                                    My solution in the UK - I had my dates with dots in them like this:



                                                                                                    03.01.17


                                                                                                    I solved this with the following:




                                                                                                    1. Highlight the whole column.

                                                                                                    2. Go to find and select/ replace.

                                                                                                    3. I replaced all the full stops with middle dash eg 03.01.17 03-01-17.

                                                                                                    4. Keep the column highlighted.

                                                                                                    5. Format cells, number tab select date.

                                                                                                    6. Use the Type 14-03-12 (essential for mine to have the middle dash)

                                                                                                    7. Locale English (United Kingdom)


                                                                                                    When sorting the column all dates for the year are sorted.







                                                                                                    share|improve this answer














                                                                                                    share|improve this answer



                                                                                                    share|improve this answer








                                                                                                    edited Dec 13 '16 at 17:22









                                                                                                    3498DB

                                                                                                    15.6k114761




                                                                                                    15.6k114761










                                                                                                    answered Dec 13 '16 at 11:25









                                                                                                    Charlie

                                                                                                    1




                                                                                                    1






















                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        So I had the same issue. None of the solutions above either worked for me or I found them too complex for my skill level.



                                                                                                        What I ended up doing was doing a text-to-columns on the date delimiter. I then used the date() function to recreate the date using the day, month and year cells. Worked.






                                                                                                        share|improve this answer





















                                                                                                        • The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                                                                                                          – Scott
                                                                                                          Jun 3 '17 at 22:22















                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        So I had the same issue. None of the solutions above either worked for me or I found them too complex for my skill level.



                                                                                                        What I ended up doing was doing a text-to-columns on the date delimiter. I then used the date() function to recreate the date using the day, month and year cells. Worked.






                                                                                                        share|improve this answer





















                                                                                                        • The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                                                                                                          – Scott
                                                                                                          Jun 3 '17 at 22:22













                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote










                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote









                                                                                                        So I had the same issue. None of the solutions above either worked for me or I found them too complex for my skill level.



                                                                                                        What I ended up doing was doing a text-to-columns on the date delimiter. I then used the date() function to recreate the date using the day, month and year cells. Worked.






                                                                                                        share|improve this answer












                                                                                                        So I had the same issue. None of the solutions above either worked for me or I found them too complex for my skill level.



                                                                                                        What I ended up doing was doing a text-to-columns on the date delimiter. I then used the date() function to recreate the date using the day, month and year cells. Worked.







                                                                                                        share|improve this answer












                                                                                                        share|improve this answer



                                                                                                        share|improve this answer










                                                                                                        answered Jan 6 '17 at 14:42









                                                                                                        ibgb

                                                                                                        1




                                                                                                        1












                                                                                                        • The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                                                                                                          – Scott
                                                                                                          Jun 3 '17 at 22:22


















                                                                                                        • The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                                                                                                          – Scott
                                                                                                          Jun 3 '17 at 22:22
















                                                                                                        The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                                                                                                        – Scott
                                                                                                        Jun 3 '17 at 22:22




                                                                                                        The accepted answer really didn’t work for you?   You seem to have posted something that is, essentially, a more complicated and bothersome (labor-intensive) version of r0berts’s answer.
                                                                                                        – Scott
                                                                                                        Jun 3 '17 at 22:22










                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        I tried the various suggestions, but found the easiest solution for me was as follows...



                                                                                                        See Images 1 and 2 for the example... (note - some fields were hidden intentionally as they do not contribute to the example). I hope this helps...




                                                                                                        1. Field C - a mixed format that drove me absolutely crazy. This is how the data came directly from the database and had no extra spaces or crazy characters. When displaying it as a text for example, the 01/01/2016 displayed as a '42504' type value, intermixed with the 04/15/2006 which showed as is.


                                                                                                        2. Field F - where I obtained the length of field C (the LEN formula would be a length of 5 of 10 depending on the date format). The field is General format for simplicity.


                                                                                                        3. Field G - obtaining the month component of the mixed date - based on the length result in field F (5 or 10), I either obtain the month from the date value in field C, or obtain the month characters in the string.


                                                                                                        4. Field H - obtaining the day component of the mixed date - based on the length result in field F (5 or 10), I either obtain the day from the date value in field C, or obtain the day characters in the string.



                                                                                                        I can do this for the year as well, then create a date from the three components that is consistent. Otherwise, I can use the individual day, month, and year values in my analysis.



                                                                                                        Image 1: basic spreadsheet showing values and field names



                                                                                                        Image 2: spreadsheet showing formulas matching explanation above



                                                                                                        I hope this helps.






                                                                                                        share|improve this answer





















                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22












                                                                                                        • (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22










                                                                                                        • (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23












                                                                                                        • (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23










                                                                                                        • (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23















                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        I tried the various suggestions, but found the easiest solution for me was as follows...



                                                                                                        See Images 1 and 2 for the example... (note - some fields were hidden intentionally as they do not contribute to the example). I hope this helps...




                                                                                                        1. Field C - a mixed format that drove me absolutely crazy. This is how the data came directly from the database and had no extra spaces or crazy characters. When displaying it as a text for example, the 01/01/2016 displayed as a '42504' type value, intermixed with the 04/15/2006 which showed as is.


                                                                                                        2. Field F - where I obtained the length of field C (the LEN formula would be a length of 5 of 10 depending on the date format). The field is General format for simplicity.


                                                                                                        3. Field G - obtaining the month component of the mixed date - based on the length result in field F (5 or 10), I either obtain the month from the date value in field C, or obtain the month characters in the string.


                                                                                                        4. Field H - obtaining the day component of the mixed date - based on the length result in field F (5 or 10), I either obtain the day from the date value in field C, or obtain the day characters in the string.



                                                                                                        I can do this for the year as well, then create a date from the three components that is consistent. Otherwise, I can use the individual day, month, and year values in my analysis.



                                                                                                        Image 1: basic spreadsheet showing values and field names



                                                                                                        Image 2: spreadsheet showing formulas matching explanation above



                                                                                                        I hope this helps.






                                                                                                        share|improve this answer





















                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22












                                                                                                        • (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22










                                                                                                        • (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23












                                                                                                        • (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23










                                                                                                        • (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23













                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote










                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote









                                                                                                        I tried the various suggestions, but found the easiest solution for me was as follows...



                                                                                                        See Images 1 and 2 for the example... (note - some fields were hidden intentionally as they do not contribute to the example). I hope this helps...




                                                                                                        1. Field C - a mixed format that drove me absolutely crazy. This is how the data came directly from the database and had no extra spaces or crazy characters. When displaying it as a text for example, the 01/01/2016 displayed as a '42504' type value, intermixed with the 04/15/2006 which showed as is.


                                                                                                        2. Field F - where I obtained the length of field C (the LEN formula would be a length of 5 of 10 depending on the date format). The field is General format for simplicity.


                                                                                                        3. Field G - obtaining the month component of the mixed date - based on the length result in field F (5 or 10), I either obtain the month from the date value in field C, or obtain the month characters in the string.


                                                                                                        4. Field H - obtaining the day component of the mixed date - based on the length result in field F (5 or 10), I either obtain the day from the date value in field C, or obtain the day characters in the string.



                                                                                                        I can do this for the year as well, then create a date from the three components that is consistent. Otherwise, I can use the individual day, month, and year values in my analysis.



                                                                                                        Image 1: basic spreadsheet showing values and field names



                                                                                                        Image 2: spreadsheet showing formulas matching explanation above



                                                                                                        I hope this helps.






                                                                                                        share|improve this answer












                                                                                                        I tried the various suggestions, but found the easiest solution for me was as follows...



                                                                                                        See Images 1 and 2 for the example... (note - some fields were hidden intentionally as they do not contribute to the example). I hope this helps...




                                                                                                        1. Field C - a mixed format that drove me absolutely crazy. This is how the data came directly from the database and had no extra spaces or crazy characters. When displaying it as a text for example, the 01/01/2016 displayed as a '42504' type value, intermixed with the 04/15/2006 which showed as is.


                                                                                                        2. Field F - where I obtained the length of field C (the LEN formula would be a length of 5 of 10 depending on the date format). The field is General format for simplicity.


                                                                                                        3. Field G - obtaining the month component of the mixed date - based on the length result in field F (5 or 10), I either obtain the month from the date value in field C, or obtain the month characters in the string.


                                                                                                        4. Field H - obtaining the day component of the mixed date - based on the length result in field F (5 or 10), I either obtain the day from the date value in field C, or obtain the day characters in the string.



                                                                                                        I can do this for the year as well, then create a date from the three components that is consistent. Otherwise, I can use the individual day, month, and year values in my analysis.



                                                                                                        Image 1: basic spreadsheet showing values and field names



                                                                                                        Image 2: spreadsheet showing formulas matching explanation above



                                                                                                        I hope this helps.







                                                                                                        share|improve this answer












                                                                                                        share|improve this answer



                                                                                                        share|improve this answer










                                                                                                        answered Jan 13 '17 at 13:02









                                                                                                        Eran

                                                                                                        1




                                                                                                        1












                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22












                                                                                                        • (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22










                                                                                                        • (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23












                                                                                                        • (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23










                                                                                                        • (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23


















                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22












                                                                                                        • (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:22










                                                                                                        • (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23












                                                                                                        • (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23










                                                                                                        • (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:23
















                                                                                                        (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:22






                                                                                                        (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) You seem to understand the problem — that numeric dates like 04/08 are ambiguous. 04/08 will be interpreted as April 8 in some locales (such as the United States) and 4-Aug in others (such as England).  But these are ambiguous precisely because the month number and the day-of-the-month are different. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:22














                                                                                                        (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:22




                                                                                                        (Cont’d) …  So why would you use un ambiguous dates like 01/01 in your answer?  (3) Actually, I’m not sure you do understand the problem, or that your answer actually does work, inasmuch as your sheet has rows where the month # is 15; that appears to be an obvious error.  And, given that 04/15 is unambiguous — it must mean April 15 — it doesn’t make sense that your method parses 01/11 as the 1st day of the 11th month. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:22












                                                                                                        (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:23






                                                                                                        (Cont’d) …  (4) It should be pointed out that, at best, you answer will handle only dates that look like nn/nn/nnnn.  It will fail on dates like 5/8, 5/08, 5/28, 05/8, and 11/8.  Also — fun fact — your answer will fail on dates ≤ May 17, 1927 and ≥ October 17, 2173.  Never mind the Y10K problem; we may start having issues as soon as 154 years from now!  (5) You say, “I can do this for the year as well, then create a date from the three components that is consistent.”  So why don’t you, and show it? … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:23














                                                                                                        (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:23




                                                                                                        (Cont’d) …  It’s especially hard to verify that your method works when you present an incomplete version of it; one that doesn’t show the month, day and year being reassembled into a date.  (6) As I told Patsaeed, it would have been nice if you had used the OP’s data, from the question, rather than making up your own.  Failing to use the OP’s data, it might have been nice if you had used Patsaeed’s, so at least we’d be able to compare apples to apples. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:23












                                                                                                        (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:23




                                                                                                        (Cont’d) …  And, whether you use the OP’s data or somebody else’s, it would have been nice if you had shown the original input to your scenario.  (For example, for Row 7, is it 01/11/2016 or 11/01/2016?)  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month that demonstrate (for example) how 1/11 and 1/21 are handled differently. And why have duplicate data?  You’ve wasted 19 rows by using the same four values multiple times, spread out over 23 rows.
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:23










                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        SHARING A LITTLE LONG BUT MUCH EASIER SOLUTION TO SUBJECT.....
                                                                                                        No need to run macros or geeky stuff....simple ms excel formulae and editing.



                                                                                                        mixed dates excel snapshot:



                                                                                                        enter image description here




                                                                                                        • The date is in the mixed format.

                                                                                                        • Therefore, to make a symmetrical
                                                                                                          date format, extra columns have been created converting that 'mixed
                                                                                                          format' date column to TEXT.

                                                                                                        • From that text we have identified the
                                                                                                          positions of "/" and middle text has been extracted determining
                                                                                                          date, month, year using MID formula.

                                                                                                        • Those which were originally dates, formula ended with ERROR / #VALUE result. - Finally, from the string we created - we have converted those to dates by DATE formula.


                                                                                                        • #VALUE were picked as it is by IFERROR added to DATE formula & the column was formatted as required (here, dd/mmm/yy)


                                                                                                        * REFER THE SNAPSHOT OF EXCEL SHEET ABOVE (= mixed dates excel snapshot) *






                                                                                                        share|improve this answer























                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20










                                                                                                        • (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20















                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        SHARING A LITTLE LONG BUT MUCH EASIER SOLUTION TO SUBJECT.....
                                                                                                        No need to run macros or geeky stuff....simple ms excel formulae and editing.



                                                                                                        mixed dates excel snapshot:



                                                                                                        enter image description here




                                                                                                        • The date is in the mixed format.

                                                                                                        • Therefore, to make a symmetrical
                                                                                                          date format, extra columns have been created converting that 'mixed
                                                                                                          format' date column to TEXT.

                                                                                                        • From that text we have identified the
                                                                                                          positions of "/" and middle text has been extracted determining
                                                                                                          date, month, year using MID formula.

                                                                                                        • Those which were originally dates, formula ended with ERROR / #VALUE result. - Finally, from the string we created - we have converted those to dates by DATE formula.


                                                                                                        • #VALUE were picked as it is by IFERROR added to DATE formula & the column was formatted as required (here, dd/mmm/yy)


                                                                                                        * REFER THE SNAPSHOT OF EXCEL SHEET ABOVE (= mixed dates excel snapshot) *






                                                                                                        share|improve this answer























                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20










                                                                                                        • (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20













                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote










                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote









                                                                                                        SHARING A LITTLE LONG BUT MUCH EASIER SOLUTION TO SUBJECT.....
                                                                                                        No need to run macros or geeky stuff....simple ms excel formulae and editing.



                                                                                                        mixed dates excel snapshot:



                                                                                                        enter image description here




                                                                                                        • The date is in the mixed format.

                                                                                                        • Therefore, to make a symmetrical
                                                                                                          date format, extra columns have been created converting that 'mixed
                                                                                                          format' date column to TEXT.

                                                                                                        • From that text we have identified the
                                                                                                          positions of "/" and middle text has been extracted determining
                                                                                                          date, month, year using MID formula.

                                                                                                        • Those which were originally dates, formula ended with ERROR / #VALUE result. - Finally, from the string we created - we have converted those to dates by DATE formula.


                                                                                                        • #VALUE were picked as it is by IFERROR added to DATE formula & the column was formatted as required (here, dd/mmm/yy)


                                                                                                        * REFER THE SNAPSHOT OF EXCEL SHEET ABOVE (= mixed dates excel snapshot) *






                                                                                                        share|improve this answer














                                                                                                        SHARING A LITTLE LONG BUT MUCH EASIER SOLUTION TO SUBJECT.....
                                                                                                        No need to run macros or geeky stuff....simple ms excel formulae and editing.



                                                                                                        mixed dates excel snapshot:



                                                                                                        enter image description here




                                                                                                        • The date is in the mixed format.

                                                                                                        • Therefore, to make a symmetrical
                                                                                                          date format, extra columns have been created converting that 'mixed
                                                                                                          format' date column to TEXT.

                                                                                                        • From that text we have identified the
                                                                                                          positions of "/" and middle text has been extracted determining
                                                                                                          date, month, year using MID formula.

                                                                                                        • Those which were originally dates, formula ended with ERROR / #VALUE result. - Finally, from the string we created - we have converted those to dates by DATE formula.


                                                                                                        • #VALUE were picked as it is by IFERROR added to DATE formula & the column was formatted as required (here, dd/mmm/yy)


                                                                                                        * REFER THE SNAPSHOT OF EXCEL SHEET ABOVE (= mixed dates excel snapshot) *







                                                                                                        share|improve this answer














                                                                                                        share|improve this answer



                                                                                                        share|improve this answer








                                                                                                        edited May 18 '17 at 20:11









                                                                                                        Pierre.Vriens

                                                                                                        1,20561218




                                                                                                        1,20561218










                                                                                                        answered Aug 28 '16 at 14:45









                                                                                                        Patsaeed

                                                                                                        112




                                                                                                        112












                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20










                                                                                                        • (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20


















                                                                                                        • (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20










                                                                                                        • (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                                                                                                          – Scott
                                                                                                          Jun 4 '17 at 20:20
















                                                                                                        (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:20




                                                                                                        (1) While it is nice to post a screen image to demonstrate that your answer actually works, we prefer that the formulas in your solution be posted as text in the body of your answer, so people can copy and paste them. (2) Your formulas as shown in your image are wrong, inasmuch as they refer to Columns V, W, and X when they should be referring to Columns B, C, and D. … (Cont’d)
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:20












                                                                                                        (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:20




                                                                                                        (Cont’d) … (3) It would have been nice if you had used the OP’s data, from the question, rather than making up your own.  And, whether you use the OP’s data or your own, it would have been nice if you had shown the original input to your scenario (e.g., for Row 9, it is 5/8/2014 or 5/08/2014).  And, if you’re going to use your own data, it would have been nice if you had included dates from the same month, to demonstrate (for example) how 5/8 and 5/28 are handled differently. And why have duplicate data?  You’ve wasted six rows by using the same values more than once.
                                                                                                        – Scott
                                                                                                        Jun 4 '17 at 20:20










                                                                                                        up vote
                                                                                                        0
                                                                                                        down vote













                                                                                                        Select dates and run this code over it..



                                                                                                        On Error Resume Next
                                                                                                        For Each xcell In Selection

                                                                                                        xcell.Value = CDate(xcell.Value)

                                                                                                        Next xcell

                                                                                                        End Sub






                                                                                                        share|improve this answer

























                                                                                                          up vote
                                                                                                          0
                                                                                                          down vote













                                                                                                          Select dates and run this code over it..



                                                                                                          On Error Resume Next
                                                                                                          For Each xcell In Selection

                                                                                                          xcell.Value = CDate(xcell.Value)

                                                                                                          Next xcell

                                                                                                          End Sub






                                                                                                          share|improve this answer























                                                                                                            up vote
                                                                                                            0
                                                                                                            down vote










                                                                                                            up vote
                                                                                                            0
                                                                                                            down vote









                                                                                                            Select dates and run this code over it..



                                                                                                            On Error Resume Next
                                                                                                            For Each xcell In Selection

                                                                                                            xcell.Value = CDate(xcell.Value)

                                                                                                            Next xcell

                                                                                                            End Sub






                                                                                                            share|improve this answer












                                                                                                            Select dates and run this code over it..



                                                                                                            On Error Resume Next
                                                                                                            For Each xcell In Selection

                                                                                                            xcell.Value = CDate(xcell.Value)

                                                                                                            Next xcell

                                                                                                            End Sub







                                                                                                            share|improve this answer












                                                                                                            share|improve this answer



                                                                                                            share|improve this answer










                                                                                                            answered Jul 6 '17 at 23:51









                                                                                                            Kathryn

                                                                                                            1




                                                                                                            1






















                                                                                                                up vote
                                                                                                                0
                                                                                                                down vote













                                                                                                                This happens all the time when exchanging date data between locales in Excel.
                                                                                                                If you have control over the VBA program that exports the data, I suggest exporting the number representing the date instead of the date itself. The number uniquely correlates with a single date, regardless of formatting and locale.
                                                                                                                For example, instead of the CSV file showing 24/09/2010 it will show 40445.



                                                                                                                In the export loop when you hold each cell, if it's a date, convert to number using CLng(myDateValue). This is an example of my loop running through all rows of a table and exporting to CSV (note I also replace commas in strings with a tag that I strip when importing, but you may not need this):



                                                                                                                arr = Worksheets(strSheetName).Range(strTableName & "[#Data]").Value

                                                                                                                For i = LBound(arr, 1) To UBound(arr, 1)
                                                                                                                strLine = ""
                                                                                                                For j = LBound(arr, 2) To UBound(arr, 2) - 1
                                                                                                                varCurrentValue = arr(i, j)
                                                                                                                If VarType(varCurrentValue) = vbString Then
                                                                                                                varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                End If
                                                                                                                If VarType(varCurrentValue) = vbDate Then
                                                                                                                varCurrentValue = CLng(varCurrentValue)
                                                                                                                End If
                                                                                                                strLine = strLine & varCurrentValue & ","
                                                                                                                Next j
                                                                                                                'Last column - not adding comma
                                                                                                                varCurrentValue = arr(i, j)
                                                                                                                If VarType(varCurrentValue) = vbString Then
                                                                                                                varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                End If
                                                                                                                If VarType(varCurrentValue) = vbDate Then
                                                                                                                varCurrentValue = CLng(varCurrentValue)
                                                                                                                End If
                                                                                                                strLine = strLine & varCurrentValue

                                                                                                                strLine = Replace(strLine, vbCrLf, "<vbCrLf>") 'replace all vbCrLf with tag - to avoid new line in output file
                                                                                                                strLine = Replace(strLine, vbLf, "<vbLf>") 'replace all vbLf with tag - to avoid new line in output file
                                                                                                                Print #intFileHandle, strLine
                                                                                                                Next i





                                                                                                                share|improve this answer

























                                                                                                                  up vote
                                                                                                                  0
                                                                                                                  down vote













                                                                                                                  This happens all the time when exchanging date data between locales in Excel.
                                                                                                                  If you have control over the VBA program that exports the data, I suggest exporting the number representing the date instead of the date itself. The number uniquely correlates with a single date, regardless of formatting and locale.
                                                                                                                  For example, instead of the CSV file showing 24/09/2010 it will show 40445.



                                                                                                                  In the export loop when you hold each cell, if it's a date, convert to number using CLng(myDateValue). This is an example of my loop running through all rows of a table and exporting to CSV (note I also replace commas in strings with a tag that I strip when importing, but you may not need this):



                                                                                                                  arr = Worksheets(strSheetName).Range(strTableName & "[#Data]").Value

                                                                                                                  For i = LBound(arr, 1) To UBound(arr, 1)
                                                                                                                  strLine = ""
                                                                                                                  For j = LBound(arr, 2) To UBound(arr, 2) - 1
                                                                                                                  varCurrentValue = arr(i, j)
                                                                                                                  If VarType(varCurrentValue) = vbString Then
                                                                                                                  varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                  End If
                                                                                                                  If VarType(varCurrentValue) = vbDate Then
                                                                                                                  varCurrentValue = CLng(varCurrentValue)
                                                                                                                  End If
                                                                                                                  strLine = strLine & varCurrentValue & ","
                                                                                                                  Next j
                                                                                                                  'Last column - not adding comma
                                                                                                                  varCurrentValue = arr(i, j)
                                                                                                                  If VarType(varCurrentValue) = vbString Then
                                                                                                                  varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                  End If
                                                                                                                  If VarType(varCurrentValue) = vbDate Then
                                                                                                                  varCurrentValue = CLng(varCurrentValue)
                                                                                                                  End If
                                                                                                                  strLine = strLine & varCurrentValue

                                                                                                                  strLine = Replace(strLine, vbCrLf, "<vbCrLf>") 'replace all vbCrLf with tag - to avoid new line in output file
                                                                                                                  strLine = Replace(strLine, vbLf, "<vbLf>") 'replace all vbLf with tag - to avoid new line in output file
                                                                                                                  Print #intFileHandle, strLine
                                                                                                                  Next i





                                                                                                                  share|improve this answer























                                                                                                                    up vote
                                                                                                                    0
                                                                                                                    down vote










                                                                                                                    up vote
                                                                                                                    0
                                                                                                                    down vote









                                                                                                                    This happens all the time when exchanging date data between locales in Excel.
                                                                                                                    If you have control over the VBA program that exports the data, I suggest exporting the number representing the date instead of the date itself. The number uniquely correlates with a single date, regardless of formatting and locale.
                                                                                                                    For example, instead of the CSV file showing 24/09/2010 it will show 40445.



                                                                                                                    In the export loop when you hold each cell, if it's a date, convert to number using CLng(myDateValue). This is an example of my loop running through all rows of a table and exporting to CSV (note I also replace commas in strings with a tag that I strip when importing, but you may not need this):



                                                                                                                    arr = Worksheets(strSheetName).Range(strTableName & "[#Data]").Value

                                                                                                                    For i = LBound(arr, 1) To UBound(arr, 1)
                                                                                                                    strLine = ""
                                                                                                                    For j = LBound(arr, 2) To UBound(arr, 2) - 1
                                                                                                                    varCurrentValue = arr(i, j)
                                                                                                                    If VarType(varCurrentValue) = vbString Then
                                                                                                                    varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                    End If
                                                                                                                    If VarType(varCurrentValue) = vbDate Then
                                                                                                                    varCurrentValue = CLng(varCurrentValue)
                                                                                                                    End If
                                                                                                                    strLine = strLine & varCurrentValue & ","
                                                                                                                    Next j
                                                                                                                    'Last column - not adding comma
                                                                                                                    varCurrentValue = arr(i, j)
                                                                                                                    If VarType(varCurrentValue) = vbString Then
                                                                                                                    varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                    End If
                                                                                                                    If VarType(varCurrentValue) = vbDate Then
                                                                                                                    varCurrentValue = CLng(varCurrentValue)
                                                                                                                    End If
                                                                                                                    strLine = strLine & varCurrentValue

                                                                                                                    strLine = Replace(strLine, vbCrLf, "<vbCrLf>") 'replace all vbCrLf with tag - to avoid new line in output file
                                                                                                                    strLine = Replace(strLine, vbLf, "<vbLf>") 'replace all vbLf with tag - to avoid new line in output file
                                                                                                                    Print #intFileHandle, strLine
                                                                                                                    Next i





                                                                                                                    share|improve this answer












                                                                                                                    This happens all the time when exchanging date data between locales in Excel.
                                                                                                                    If you have control over the VBA program that exports the data, I suggest exporting the number representing the date instead of the date itself. The number uniquely correlates with a single date, regardless of formatting and locale.
                                                                                                                    For example, instead of the CSV file showing 24/09/2010 it will show 40445.



                                                                                                                    In the export loop when you hold each cell, if it's a date, convert to number using CLng(myDateValue). This is an example of my loop running through all rows of a table and exporting to CSV (note I also replace commas in strings with a tag that I strip when importing, but you may not need this):



                                                                                                                    arr = Worksheets(strSheetName).Range(strTableName & "[#Data]").Value

                                                                                                                    For i = LBound(arr, 1) To UBound(arr, 1)
                                                                                                                    strLine = ""
                                                                                                                    For j = LBound(arr, 2) To UBound(arr, 2) - 1
                                                                                                                    varCurrentValue = arr(i, j)
                                                                                                                    If VarType(varCurrentValue) = vbString Then
                                                                                                                    varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                    End If
                                                                                                                    If VarType(varCurrentValue) = vbDate Then
                                                                                                                    varCurrentValue = CLng(varCurrentValue)
                                                                                                                    End If
                                                                                                                    strLine = strLine & varCurrentValue & ","
                                                                                                                    Next j
                                                                                                                    'Last column - not adding comma
                                                                                                                    varCurrentValue = arr(i, j)
                                                                                                                    If VarType(varCurrentValue) = vbString Then
                                                                                                                    varCurrentValue = Replace(varCurrentValue, ",", "<comma>")
                                                                                                                    End If
                                                                                                                    If VarType(varCurrentValue) = vbDate Then
                                                                                                                    varCurrentValue = CLng(varCurrentValue)
                                                                                                                    End If
                                                                                                                    strLine = strLine & varCurrentValue

                                                                                                                    strLine = Replace(strLine, vbCrLf, "<vbCrLf>") 'replace all vbCrLf with tag - to avoid new line in output file
                                                                                                                    strLine = Replace(strLine, vbLf, "<vbLf>") 'replace all vbLf with tag - to avoid new line in output file
                                                                                                                    Print #intFileHandle, strLine
                                                                                                                    Next i






                                                                                                                    share|improve this answer












                                                                                                                    share|improve this answer



                                                                                                                    share|improve this answer










                                                                                                                    answered Sep 27 '17 at 10:50









                                                                                                                    Mor Sagmon

                                                                                                                    1




                                                                                                                    1






















                                                                                                                        up vote
                                                                                                                        0
                                                                                                                        down vote













                                                                                                                        I found that CAST AS smalldatetime solves my problem. Solution found here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0f8dd05-4212-428f-8099-748e87c637ae/format-data-from-sql-server-view-as-date-in-excel?forum=sqlkjpowerpivotforexcel



                                                                                                                        That of course only works, if you have access to the underlying query.






                                                                                                                        share|improve this answer

























                                                                                                                          up vote
                                                                                                                          0
                                                                                                                          down vote













                                                                                                                          I found that CAST AS smalldatetime solves my problem. Solution found here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0f8dd05-4212-428f-8099-748e87c637ae/format-data-from-sql-server-view-as-date-in-excel?forum=sqlkjpowerpivotforexcel



                                                                                                                          That of course only works, if you have access to the underlying query.






                                                                                                                          share|improve this answer























                                                                                                                            up vote
                                                                                                                            0
                                                                                                                            down vote










                                                                                                                            up vote
                                                                                                                            0
                                                                                                                            down vote









                                                                                                                            I found that CAST AS smalldatetime solves my problem. Solution found here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0f8dd05-4212-428f-8099-748e87c637ae/format-data-from-sql-server-view-as-date-in-excel?forum=sqlkjpowerpivotforexcel



                                                                                                                            That of course only works, if you have access to the underlying query.






                                                                                                                            share|improve this answer












                                                                                                                            I found that CAST AS smalldatetime solves my problem. Solution found here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f0f8dd05-4212-428f-8099-748e87c637ae/format-data-from-sql-server-view-as-date-in-excel?forum=sqlkjpowerpivotforexcel



                                                                                                                            That of course only works, if you have access to the underlying query.







                                                                                                                            share|improve this answer












                                                                                                                            share|improve this answer



                                                                                                                            share|improve this answer










                                                                                                                            answered Oct 20 '17 at 10:51









                                                                                                                            Spurious

                                                                                                                            11414




                                                                                                                            11414






















                                                                                                                                up vote
                                                                                                                                0
                                                                                                                                down vote













                                                                                                                                I was not having any luck with all the above suggestions - came up with a very simple solution that works like a charm. Paste the data into Google Sheets, highlight the date column, click on format, then number, and number once again to change it to number format. I then copy and paste the data into the Excel spreadsheet, click on the dates, then format cells to date. Very quick. Hope this helps.






                                                                                                                                share|improve this answer

























                                                                                                                                  up vote
                                                                                                                                  0
                                                                                                                                  down vote













                                                                                                                                  I was not having any luck with all the above suggestions - came up with a very simple solution that works like a charm. Paste the data into Google Sheets, highlight the date column, click on format, then number, and number once again to change it to number format. I then copy and paste the data into the Excel spreadsheet, click on the dates, then format cells to date. Very quick. Hope this helps.






                                                                                                                                  share|improve this answer























                                                                                                                                    up vote
                                                                                                                                    0
                                                                                                                                    down vote










                                                                                                                                    up vote
                                                                                                                                    0
                                                                                                                                    down vote









                                                                                                                                    I was not having any luck with all the above suggestions - came up with a very simple solution that works like a charm. Paste the data into Google Sheets, highlight the date column, click on format, then number, and number once again to change it to number format. I then copy and paste the data into the Excel spreadsheet, click on the dates, then format cells to date. Very quick. Hope this helps.






                                                                                                                                    share|improve this answer












                                                                                                                                    I was not having any luck with all the above suggestions - came up with a very simple solution that works like a charm. Paste the data into Google Sheets, highlight the date column, click on format, then number, and number once again to change it to number format. I then copy and paste the data into the Excel spreadsheet, click on the dates, then format cells to date. Very quick. Hope this helps.







                                                                                                                                    share|improve this answer












                                                                                                                                    share|improve this answer



                                                                                                                                    share|improve this answer










                                                                                                                                    answered Nov 9 '17 at 14:24









                                                                                                                                    Mike

                                                                                                                                    1




                                                                                                                                    1






















                                                                                                                                        up vote
                                                                                                                                        0
                                                                                                                                        down vote













                                                                                                                                        This problem was driving me crazy, then I stumbled on an easy fix. At least it worked for my data. It is easy to do and to remember. But I do not know why this works but changing types as indicated above does not.
                                                                                                                                        1. Select the column(s) with the dates
                                                                                                                                        2. Search for a year in your dates, for example 2015. Select Replace All with the same year, 2015.
                                                                                                                                        3. Repeat for each year.
                                                                                                                                        This changes the types to actual dates, year by year.

                                                                                                                                        This is still cumbersome if you have many years in your data. Faster is to search for and replace 201 with 201 (to replace 2010 through 2019); replace 200 with 200 (to replace 2000 through 2009); and so forth.






                                                                                                                                        share|improve this answer

























                                                                                                                                          up vote
                                                                                                                                          0
                                                                                                                                          down vote













                                                                                                                                          This problem was driving me crazy, then I stumbled on an easy fix. At least it worked for my data. It is easy to do and to remember. But I do not know why this works but changing types as indicated above does not.
                                                                                                                                          1. Select the column(s) with the dates
                                                                                                                                          2. Search for a year in your dates, for example 2015. Select Replace All with the same year, 2015.
                                                                                                                                          3. Repeat for each year.
                                                                                                                                          This changes the types to actual dates, year by year.

                                                                                                                                          This is still cumbersome if you have many years in your data. Faster is to search for and replace 201 with 201 (to replace 2010 through 2019); replace 200 with 200 (to replace 2000 through 2009); and so forth.






                                                                                                                                          share|improve this answer























                                                                                                                                            up vote
                                                                                                                                            0
                                                                                                                                            down vote










                                                                                                                                            up vote
                                                                                                                                            0
                                                                                                                                            down vote









                                                                                                                                            This problem was driving me crazy, then I stumbled on an easy fix. At least it worked for my data. It is easy to do and to remember. But I do not know why this works but changing types as indicated above does not.
                                                                                                                                            1. Select the column(s) with the dates
                                                                                                                                            2. Search for a year in your dates, for example 2015. Select Replace All with the same year, 2015.
                                                                                                                                            3. Repeat for each year.
                                                                                                                                            This changes the types to actual dates, year by year.

                                                                                                                                            This is still cumbersome if you have many years in your data. Faster is to search for and replace 201 with 201 (to replace 2010 through 2019); replace 200 with 200 (to replace 2000 through 2009); and so forth.






                                                                                                                                            share|improve this answer












                                                                                                                                            This problem was driving me crazy, then I stumbled on an easy fix. At least it worked for my data. It is easy to do and to remember. But I do not know why this works but changing types as indicated above does not.
                                                                                                                                            1. Select the column(s) with the dates
                                                                                                                                            2. Search for a year in your dates, for example 2015. Select Replace All with the same year, 2015.
                                                                                                                                            3. Repeat for each year.
                                                                                                                                            This changes the types to actual dates, year by year.

                                                                                                                                            This is still cumbersome if you have many years in your data. Faster is to search for and replace 201 with 201 (to replace 2010 through 2019); replace 200 with 200 (to replace 2000 through 2009); and so forth.







                                                                                                                                            share|improve this answer












                                                                                                                                            share|improve this answer



                                                                                                                                            share|improve this answer










                                                                                                                                            answered Nov 20 '17 at 15:59









                                                                                                                                            Wally

                                                                                                                                            1




                                                                                                                                            1






















                                                                                                                                                up vote
                                                                                                                                                0
                                                                                                                                                down vote













                                                                                                                                                I was able to fix the problem after realizing that the "Show Formulas" was selected. in Excel 2016, go to Formulas, then the Formula Auditing section and make sure "Show Formulas" isn't selected. Fixed my problem.






                                                                                                                                                share|improve this answer

























                                                                                                                                                  up vote
                                                                                                                                                  0
                                                                                                                                                  down vote













                                                                                                                                                  I was able to fix the problem after realizing that the "Show Formulas" was selected. in Excel 2016, go to Formulas, then the Formula Auditing section and make sure "Show Formulas" isn't selected. Fixed my problem.






                                                                                                                                                  share|improve this answer























                                                                                                                                                    up vote
                                                                                                                                                    0
                                                                                                                                                    down vote










                                                                                                                                                    up vote
                                                                                                                                                    0
                                                                                                                                                    down vote









                                                                                                                                                    I was able to fix the problem after realizing that the "Show Formulas" was selected. in Excel 2016, go to Formulas, then the Formula Auditing section and make sure "Show Formulas" isn't selected. Fixed my problem.






                                                                                                                                                    share|improve this answer












                                                                                                                                                    I was able to fix the problem after realizing that the "Show Formulas" was selected. in Excel 2016, go to Formulas, then the Formula Auditing section and make sure "Show Formulas" isn't selected. Fixed my problem.







                                                                                                                                                    share|improve this answer












                                                                                                                                                    share|improve this answer



                                                                                                                                                    share|improve this answer










                                                                                                                                                    answered Dec 6 '17 at 20:28









                                                                                                                                                    Donna

                                                                                                                                                    1




                                                                                                                                                    1






















                                                                                                                                                        up vote
                                                                                                                                                        0
                                                                                                                                                        down vote













                                                                                                                                                        I had the similar problem, but I noticed I had an extra spaces at the end of the date. I removed the spaces with replace command and now date sorting works fine.






                                                                                                                                                        share|improve this answer

























                                                                                                                                                          up vote
                                                                                                                                                          0
                                                                                                                                                          down vote













                                                                                                                                                          I had the similar problem, but I noticed I had an extra spaces at the end of the date. I removed the spaces with replace command and now date sorting works fine.






                                                                                                                                                          share|improve this answer























                                                                                                                                                            up vote
                                                                                                                                                            0
                                                                                                                                                            down vote










                                                                                                                                                            up vote
                                                                                                                                                            0
                                                                                                                                                            down vote









                                                                                                                                                            I had the similar problem, but I noticed I had an extra spaces at the end of the date. I removed the spaces with replace command and now date sorting works fine.






                                                                                                                                                            share|improve this answer












                                                                                                                                                            I had the similar problem, but I noticed I had an extra spaces at the end of the date. I removed the spaces with replace command and now date sorting works fine.







                                                                                                                                                            share|improve this answer












                                                                                                                                                            share|improve this answer



                                                                                                                                                            share|improve this answer










                                                                                                                                                            answered Jun 8 at 8:19









                                                                                                                                                            Martti

                                                                                                                                                            1




                                                                                                                                                            1






















                                                                                                                                                                up vote
                                                                                                                                                                0
                                                                                                                                                                down vote













                                                                                                                                                                this problem made me almost break my laptop



                                                                                                                                                                long story short, i had a similar problem where the dates are working just fine in some cells but keep flipping in others regardless if i copy paste or enter manually, i did the whole data text to column and cell formatting solutions and all of that didn't work.



                                                                                                                                                                the solution actually is not in excel, its in the region and language setting.. i know right !!!



                                                                                                                                                                to have the dates display as MM/DD/YYYY in the formats tab change the format to US



                                                                                                                                                                to have the dates display as DD/MM/YYYY in the formats tab change the format to UK



                                                                                                                                                                Voila !






                                                                                                                                                                share|improve this answer








                                                                                                                                                                New contributor




                                                                                                                                                                Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                Check out our Code of Conduct.






















                                                                                                                                                                  up vote
                                                                                                                                                                  0
                                                                                                                                                                  down vote













                                                                                                                                                                  this problem made me almost break my laptop



                                                                                                                                                                  long story short, i had a similar problem where the dates are working just fine in some cells but keep flipping in others regardless if i copy paste or enter manually, i did the whole data text to column and cell formatting solutions and all of that didn't work.



                                                                                                                                                                  the solution actually is not in excel, its in the region and language setting.. i know right !!!



                                                                                                                                                                  to have the dates display as MM/DD/YYYY in the formats tab change the format to US



                                                                                                                                                                  to have the dates display as DD/MM/YYYY in the formats tab change the format to UK



                                                                                                                                                                  Voila !






                                                                                                                                                                  share|improve this answer








                                                                                                                                                                  New contributor




                                                                                                                                                                  Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                  Check out our Code of Conduct.




















                                                                                                                                                                    up vote
                                                                                                                                                                    0
                                                                                                                                                                    down vote










                                                                                                                                                                    up vote
                                                                                                                                                                    0
                                                                                                                                                                    down vote









                                                                                                                                                                    this problem made me almost break my laptop



                                                                                                                                                                    long story short, i had a similar problem where the dates are working just fine in some cells but keep flipping in others regardless if i copy paste or enter manually, i did the whole data text to column and cell formatting solutions and all of that didn't work.



                                                                                                                                                                    the solution actually is not in excel, its in the region and language setting.. i know right !!!



                                                                                                                                                                    to have the dates display as MM/DD/YYYY in the formats tab change the format to US



                                                                                                                                                                    to have the dates display as DD/MM/YYYY in the formats tab change the format to UK



                                                                                                                                                                    Voila !






                                                                                                                                                                    share|improve this answer








                                                                                                                                                                    New contributor




                                                                                                                                                                    Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                    Check out our Code of Conduct.









                                                                                                                                                                    this problem made me almost break my laptop



                                                                                                                                                                    long story short, i had a similar problem where the dates are working just fine in some cells but keep flipping in others regardless if i copy paste or enter manually, i did the whole data text to column and cell formatting solutions and all of that didn't work.



                                                                                                                                                                    the solution actually is not in excel, its in the region and language setting.. i know right !!!



                                                                                                                                                                    to have the dates display as MM/DD/YYYY in the formats tab change the format to US



                                                                                                                                                                    to have the dates display as DD/MM/YYYY in the formats tab change the format to UK



                                                                                                                                                                    Voila !







                                                                                                                                                                    share|improve this answer








                                                                                                                                                                    New contributor




                                                                                                                                                                    Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                    Check out our Code of Conduct.









                                                                                                                                                                    share|improve this answer



                                                                                                                                                                    share|improve this answer






                                                                                                                                                                    New contributor




                                                                                                                                                                    Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                    Check out our Code of Conduct.









                                                                                                                                                                    answered 2 days ago









                                                                                                                                                                    Abdul Hammoude

                                                                                                                                                                    1




                                                                                                                                                                    1




                                                                                                                                                                    New contributor




                                                                                                                                                                    Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                    Check out our Code of Conduct.





                                                                                                                                                                    New contributor





                                                                                                                                                                    Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                    Check out our Code of Conduct.






                                                                                                                                                                    Abdul Hammoude is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                                                    Check out our Code of Conduct.






















                                                                                                                                                                        up vote
                                                                                                                                                                        -1
                                                                                                                                                                        down vote













                                                                                                                                                                        I still had problem after following several answers. Than in the format, chose 14-Mar-01 and changed locale to English (United States).. And it worked perfectly. Hope this helps.






                                                                                                                                                                        share|improve this answer

























                                                                                                                                                                          up vote
                                                                                                                                                                          -1
                                                                                                                                                                          down vote













                                                                                                                                                                          I still had problem after following several answers. Than in the format, chose 14-Mar-01 and changed locale to English (United States).. And it worked perfectly. Hope this helps.






                                                                                                                                                                          share|improve this answer























                                                                                                                                                                            up vote
                                                                                                                                                                            -1
                                                                                                                                                                            down vote










                                                                                                                                                                            up vote
                                                                                                                                                                            -1
                                                                                                                                                                            down vote









                                                                                                                                                                            I still had problem after following several answers. Than in the format, chose 14-Mar-01 and changed locale to English (United States).. And it worked perfectly. Hope this helps.






                                                                                                                                                                            share|improve this answer












                                                                                                                                                                            I still had problem after following several answers. Than in the format, chose 14-Mar-01 and changed locale to English (United States).. And it worked perfectly. Hope this helps.







                                                                                                                                                                            share|improve this answer












                                                                                                                                                                            share|improve this answer



                                                                                                                                                                            share|improve this answer










                                                                                                                                                                            answered Jan 17 '17 at 14:59









                                                                                                                                                                            Indian Indian

                                                                                                                                                                            1




                                                                                                                                                                            1






















                                                                                                                                                                                up vote
                                                                                                                                                                                -1
                                                                                                                                                                                down vote













                                                                                                                                                                                I use a mac.



                                                                                                                                                                                Go to excel preferences> Edit> Date options> Automatically convert date system



                                                                                                                                                                                Also,



                                                                                                                                                                                Go to Tables & Filters> Group dates when filtering.



                                                                                                                                                                                The problem probably started when you received a file with a different date system, and that screwed up your excel date function






                                                                                                                                                                                share|improve this answer

























                                                                                                                                                                                  up vote
                                                                                                                                                                                  -1
                                                                                                                                                                                  down vote













                                                                                                                                                                                  I use a mac.



                                                                                                                                                                                  Go to excel preferences> Edit> Date options> Automatically convert date system



                                                                                                                                                                                  Also,



                                                                                                                                                                                  Go to Tables & Filters> Group dates when filtering.



                                                                                                                                                                                  The problem probably started when you received a file with a different date system, and that screwed up your excel date function






                                                                                                                                                                                  share|improve this answer























                                                                                                                                                                                    up vote
                                                                                                                                                                                    -1
                                                                                                                                                                                    down vote










                                                                                                                                                                                    up vote
                                                                                                                                                                                    -1
                                                                                                                                                                                    down vote









                                                                                                                                                                                    I use a mac.



                                                                                                                                                                                    Go to excel preferences> Edit> Date options> Automatically convert date system



                                                                                                                                                                                    Also,



                                                                                                                                                                                    Go to Tables & Filters> Group dates when filtering.



                                                                                                                                                                                    The problem probably started when you received a file with a different date system, and that screwed up your excel date function






                                                                                                                                                                                    share|improve this answer












                                                                                                                                                                                    I use a mac.



                                                                                                                                                                                    Go to excel preferences> Edit> Date options> Automatically convert date system



                                                                                                                                                                                    Also,



                                                                                                                                                                                    Go to Tables & Filters> Group dates when filtering.



                                                                                                                                                                                    The problem probably started when you received a file with a different date system, and that screwed up your excel date function







                                                                                                                                                                                    share|improve this answer












                                                                                                                                                                                    share|improve this answer



                                                                                                                                                                                    share|improve this answer










                                                                                                                                                                                    answered Nov 30 '17 at 10:36









                                                                                                                                                                                    Stephenie

                                                                                                                                                                                    1




                                                                                                                                                                                    1






















                                                                                                                                                                                        up vote
                                                                                                                                                                                        -1
                                                                                                                                                                                        down vote













                                                                                                                                                                                        I found a very easy answer. Dates were formatted 10.11.2018 and were not being recognised as dates. having first formatted the column as dates, I did a Ctrl-H search and replace of "." with "/". All dates were instantly recognised.






                                                                                                                                                                                        share|improve this answer

























                                                                                                                                                                                          up vote
                                                                                                                                                                                          -1
                                                                                                                                                                                          down vote













                                                                                                                                                                                          I found a very easy answer. Dates were formatted 10.11.2018 and were not being recognised as dates. having first formatted the column as dates, I did a Ctrl-H search and replace of "." with "/". All dates were instantly recognised.






                                                                                                                                                                                          share|improve this answer























                                                                                                                                                                                            up vote
                                                                                                                                                                                            -1
                                                                                                                                                                                            down vote










                                                                                                                                                                                            up vote
                                                                                                                                                                                            -1
                                                                                                                                                                                            down vote









                                                                                                                                                                                            I found a very easy answer. Dates were formatted 10.11.2018 and were not being recognised as dates. having first formatted the column as dates, I did a Ctrl-H search and replace of "." with "/". All dates were instantly recognised.






                                                                                                                                                                                            share|improve this answer












                                                                                                                                                                                            I found a very easy answer. Dates were formatted 10.11.2018 and were not being recognised as dates. having first formatted the column as dates, I did a Ctrl-H search and replace of "." with "/". All dates were instantly recognised.







                                                                                                                                                                                            share|improve this answer












                                                                                                                                                                                            share|improve this answer



                                                                                                                                                                                            share|improve this answer










                                                                                                                                                                                            answered Jan 24 at 18:10









                                                                                                                                                                                            Firepig

                                                                                                                                                                                            1




                                                                                                                                                                                            1






















                                                                                                                                                                                                up vote
                                                                                                                                                                                                -2
                                                                                                                                                                                                down vote













                                                                                                                                                                                                I usually just create an extra column for sorting or totaling purposes so use year(a1)&if len(month(a1))=1,),"")&month(a1)&day(a1).



                                                                                                                                                                                                That will provide a yyyymmdd result that can be sorted. Using the len(a1) just allows an extra zero to be added for months 1-9.






                                                                                                                                                                                                share|improve this answer



















                                                                                                                                                                                                • 2




                                                                                                                                                                                                  This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                                                                                                                                                                                  – CallumDA
                                                                                                                                                                                                  Sep 26 '14 at 11:59

















                                                                                                                                                                                                up vote
                                                                                                                                                                                                -2
                                                                                                                                                                                                down vote













                                                                                                                                                                                                I usually just create an extra column for sorting or totaling purposes so use year(a1)&if len(month(a1))=1,),"")&month(a1)&day(a1).



                                                                                                                                                                                                That will provide a yyyymmdd result that can be sorted. Using the len(a1) just allows an extra zero to be added for months 1-9.






                                                                                                                                                                                                share|improve this answer



















                                                                                                                                                                                                • 2




                                                                                                                                                                                                  This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                                                                                                                                                                                  – CallumDA
                                                                                                                                                                                                  Sep 26 '14 at 11:59















                                                                                                                                                                                                up vote
                                                                                                                                                                                                -2
                                                                                                                                                                                                down vote










                                                                                                                                                                                                up vote
                                                                                                                                                                                                -2
                                                                                                                                                                                                down vote









                                                                                                                                                                                                I usually just create an extra column for sorting or totaling purposes so use year(a1)&if len(month(a1))=1,),"")&month(a1)&day(a1).



                                                                                                                                                                                                That will provide a yyyymmdd result that can be sorted. Using the len(a1) just allows an extra zero to be added for months 1-9.






                                                                                                                                                                                                share|improve this answer














                                                                                                                                                                                                I usually just create an extra column for sorting or totaling purposes so use year(a1)&if len(month(a1))=1,),"")&month(a1)&day(a1).



                                                                                                                                                                                                That will provide a yyyymmdd result that can be sorted. Using the len(a1) just allows an extra zero to be added for months 1-9.







                                                                                                                                                                                                share|improve this answer














                                                                                                                                                                                                share|improve this answer



                                                                                                                                                                                                share|improve this answer








                                                                                                                                                                                                edited Sep 26 '14 at 11:42









                                                                                                                                                                                                CharlieRB

                                                                                                                                                                                                20.4k44389




                                                                                                                                                                                                20.4k44389










                                                                                                                                                                                                answered Sep 26 '14 at 11:15









                                                                                                                                                                                                Paul

                                                                                                                                                                                                11




                                                                                                                                                                                                11








                                                                                                                                                                                                • 2




                                                                                                                                                                                                  This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                                                                                                                                                                                  – CallumDA
                                                                                                                                                                                                  Sep 26 '14 at 11:59
















                                                                                                                                                                                                • 2




                                                                                                                                                                                                  This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                                                                                                                                                                                  – CallumDA
                                                                                                                                                                                                  Sep 26 '14 at 11:59










                                                                                                                                                                                                2




                                                                                                                                                                                                2




                                                                                                                                                                                                This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                                                                                                                                                                                – CallumDA
                                                                                                                                                                                                Sep 26 '14 at 11:59






                                                                                                                                                                                                This won't help since the dates aren't being recognised as dates. Also, using extra columns for sorting purposes is rarely necessary
                                                                                                                                                                                                – CallumDA
                                                                                                                                                                                                Sep 26 '14 at 11:59




















                                                                                                                                                                                                 

                                                                                                                                                                                                draft saved


                                                                                                                                                                                                draft discarded



















































                                                                                                                                                                                                 


                                                                                                                                                                                                draft saved


                                                                                                                                                                                                draft discarded














                                                                                                                                                                                                StackExchange.ready(
                                                                                                                                                                                                function () {
                                                                                                                                                                                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f817110%2funable-to-get-excel-to-recognise-date-in-column%23new-answer', 'question_page');
                                                                                                                                                                                                }
                                                                                                                                                                                                );

                                                                                                                                                                                                Post as a guest















                                                                                                                                                                                                Required, but never shown





















































                                                                                                                                                                                                Required, but never shown














                                                                                                                                                                                                Required, but never shown












                                                                                                                                                                                                Required, but never shown







                                                                                                                                                                                                Required, but never shown

































                                                                                                                                                                                                Required, but never shown














                                                                                                                                                                                                Required, but never shown












                                                                                                                                                                                                Required, but never shown







                                                                                                                                                                                                Required, but never shown











                                                                                                                                                                                                Popular posts from this blog

                                                                                                                                                                                                "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                                                                                                                                                                                                Alcedinidae

                                                                                                                                                                                                RAC Tourist Trophy