How To Convert Date To Number Of Years In Power Query
INTRODUCTION
Most times we are asked a question concerning number of years from a given dataset but we were given just date (for instance date of birth), this article is here to show us how to convert date to number of years.
Step 1
Right click on the heading of the date column and click on Duplicate Column
Step 2
Click on the heading of the duplicate column, go to Transform menu, Click on Date and click on Age. The date will be converted to number of days from that date to today.
Step 3
Change the data type to whole number
Step 4
Now to convert the number of days to number of years, go to Add Column menu and click on Custom Column. A dialog box will popup.
Step 5
Fill in the name of the column you want to create. Select and insert the column containing the number of days /365
Step 6
The number of years column will be created, convert it to whole number
Made by Victor Ikechukwu