Microsoft Excel - All Versions |
often is taken to be working with various information systems that export the information from the system to Excel to produce reports is that the dates do not come in a readable format for Excel, causing a headache for us fraud. Here I will share with you a simple formula to convert the following types of text strings to dates:
- dd-mm-yyyy dd.mm.yyyy
= DATEVALUE (CONCATENATE (MID (cell, 1, 2 );"/"; MID (cell, 4, 2 );"/"; MID (Cell, 7, 4))) Where
cell represents the cell where is the string to convert.Finally we set the format of the cell as a date.
To convert the following types of strings:
- dd-mm-yy
- dd.mm.yy
= DATEVALUE (CONCATENATE (MID (cell, 1 , 2 );"/"; MID (cell, 4, 2 );"/"; MID (Cell, 7, 2))) Where
cell represents the cell where is the string to convert.
Finally we set the format of the cell as a date.
And the last case is for dates in the following format: ddmmyyyy
= DATEVALUE (CONCATENATE (MID (cell, 1, 2 );"/"; MID (cell, 3, 2 );"/"; MID (Cell, 5, 4))) Where cell
represents the cell where is the string to convert.
Finally we set the format of the cell as a date.