Age in Power Query different in Excel

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I tried to use Power Query to find age from DOB. When I click on Get data from Table--> Power Query editor open and when I inserted clicked on Add Column-->Age, I got 109.22:31:27.1589177 and when I Added another column -->Total year, I got 0.31201394

When I "Load and Close" to excel. Age and Total years changed as below:

my questions:

1) How to read this Age 109.22:31:27.1589177

Is it 109 days and 22:31:27 seconds?

2) Why when I Load that value (Age) to Excel, I got different one --> 18.22:31:26 ?
Total years are almost the same between Power Query and Excel

Book1 (1).xlsx
ABCDEF
1dobdobAgeTotal Years
206/03/202106/03/2021 0:0018.22:31:260.301201348
3
Sheet1
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
1) How to read this Age 109.22:31:27.1589177
days.hh:mm:ss.fraction_of_second

2) Why when I Load that value (Age) to Excel, I got different one --> 18.22:31:26 ?
Total years are almost the same between Power Query and Excel
PQ returns it to Excel with an Excel Custom format it thinks is equivalent to the PQ format being
d.hh:mm:ss
Unfortunately in Excel d means the day of the month and in your case it uses 109 days starting at 0/01/1900 which gives 18/04/1900 and d is returning 18.

Since the result is a duration none of the date time formats are really useful so just format it as General or a number and you will get something like 109.938492173898 being duration in days.
 
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,005
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top