Use the LEFT, MID, and RIGHT functions to extract date parts using Microsoft Excel
The Microsoft Excel worksheet in Figure 4-8 contains date values in column A. Excel cannot interpret these values as dates. To show the date in a correct format, the values of column A have to be extracted to year, month, and day.
The Microsoft Excel worksheet in Figure 4-8 contains date values in column A. Excel cannot interpret these values as dates. To show the date in a correct format, the values of column A have to be extracted to year, month, and day.
To extract, combine, and display the correct format:
1. Select cells B2:B10 and type the following formula: =DATE(LEFT(A2,4),MID(A2,FIND(".",A2,1)+1,2), RIGHT(A2,2)).
2. Press <-Ctrl+Enter->.
Note: The first four digits have to be transferred with the LEFT function. Then use the FIND function to detect the decimal point. On the right of the first decimal point (+1), two digits are interpreted as the month using the MID function. On the right side of the second decimal point, use the RIGHT function to extract two digits as the day value.
Watch the Video Tutorial - https://www.youtube.com/watch?v=rtM-0fLt5o4
No comments:
Post a Comment