Data from a csv file to excel, date is in MM/DD/YYYY format, region set as Australia

Body and Sole Podiatry 20 Reputation points
2024-06-18T06:28:41.07+00:00

Newbie here so simple language please.

Data was transferred as a csv file into excel file. I have subsequently entered more data. I have noticed the date of the imported data is in MM/DD/YYYY format even though settings, region, language and cell format is in Australia. Strangely as well the change happened about a year after the transfer.

The incorrect format is Left aligned in cell and the correct format is Right aligned in the cell.

I have over 6000 lines, half of them have changed. It seems that data I have entered after the transfer are the unchanged ones.

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. riny 665 Reputation points Volunteer Moderator
    2024-07-09T07:36:44.9466667+00:00

    Yes, my test dates were a bit too simple to spot the t-t-c errors. Sorry about that.

    If you happen to have a modern Excel version, you can use TEXTSPLIT to split the 'text-dates' into three components D, M, Y and then use DATE to create a real date from these three elements

    User's image

    If not you have to use a dreadful formula.

    User's image

    The formula in G8 in the picture above is as follows:

    =DATE(RIGHT(B8,4),LEFT(B8,FIND("/",B8)-1),MID(B8,FIND("/",B8)+1,FIND("/",B8,4)-FIND("/",B8)-1))

    It finds the position of each "/" to work out the D, M elements. The year is always made-up the last 4 digits.

    0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Body and Sole Podiatry 20 Reputation points
    2024-07-13T07:46:49.47+00:00

    Thanks for all your help.

    The above formula also decided to swap the corrected data around so i used two step formulas from what I have learnt here.

    =IF(ISTEXT(AX18),TEXTSPLIT(AX18,"/"),IF(ISNONTEXT(AX18),(AX18)))

    and then

    =IF(AS18=AX18,AX18,DATE(AU18,AS18,AT18))

    This is probably very clumsy but that is the way I worked it out, trial and many errors.

    Final question: Now that I have the corrected date, formatted mm/dd/yyyy, in my case column AZ (so many columns used for working out). Is there a way of making this column true date and not the result of a formula, so that when I copy this to the correct column, column O, it is a true date and not a formula? Am i making sense?

    Thanks again,

    Nicholas

    0 comments No comments

  2. riny 665 Reputation points Volunteer Moderator
    2024-07-14T05:32:43.87+00:00

    Save your file first in case something goes wrong.

    Copy column AZ. Paste values onto column O.

    That should work. If that's not what you had in mind, come back again.

    0 comments No comments

  3. Body and Sole Podiatry 20 Reputation points
    2024-07-14T07:20:34.4833333+00:00

    Thank you Riny, JiaJing Hua and Andreas Killer.With your combined help, you have fixed this headache for me.

    Great work and a great resource.

    Grateful Nicholas

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.