Hello Excel Collective
I have this value from a report, it is a date time format which is not recognized by Excel.
Example: 02-06-2022 22:00
MM-DD-YYYY HH:MM
I tried formatting this and it dis not work in most cases (if possible) it will format it so that the Month is seen as day, if the day nr is to high for month it will not format it.
Example: 02-06-2022 22:00 turns into: 02.06.2022 22:00
So for now I handle this formatted as text and usually do "Text to Column", and it does work.
Sadly in this case i need to collect values from two columns: If no value in Column A show value from Column B.
I do not want to do "Text to Column" on two columns as that over complicates the steps.
The function I am trying to use is:
=DATE(VALUE(RIGHT(LEFT(A2;LEN(A2)-6)*0,4));VALUE(LEFT(LEFT($A2;LEN($A2)-6)*0,2));VALUE(MID(LEFT($A2;LEN($A2)-6);4;2)))
A2 being: 02-06-2022 22:00
The result should be: 06.02.2022 (or 06-02-2022)
Really not sure what else to do.
Best regards.
/Mario
I have this value from a report, it is a date time format which is not recognized by Excel.
Example: 02-06-2022 22:00
MM-DD-YYYY HH:MM
I tried formatting this and it dis not work in most cases (if possible) it will format it so that the Month is seen as day, if the day nr is to high for month it will not format it.
Example: 02-06-2022 22:00 turns into: 02.06.2022 22:00
So for now I handle this formatted as text and usually do "Text to Column", and it does work.
Sadly in this case i need to collect values from two columns: If no value in Column A show value from Column B.
I do not want to do "Text to Column" on two columns as that over complicates the steps.
The function I am trying to use is:
=DATE(VALUE(RIGHT(LEFT(A2;LEN(A2)-6)*0,4));VALUE(LEFT(LEFT($A2;LEN($A2)-6)*0,2));VALUE(MID(LEFT($A2;LEN($A2)-6);4;2)))
A2 being: 02-06-2022 22:00
The result should be: 06.02.2022 (or 06-02-2022)
Really not sure what else to do.
Best regards.
/Mario