Error with making hour column from datetime column

LambChoptheKid

New Member
Joined
Dec 10, 2022
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hey everyone,

I'm experiencing a problem with Power Query making a mistake in pulling an hour from a datetime.

In the original table, the "Hour" column (2nd from left, in 24 hour format) is not there. I added that column by highlighting my datetime column in Power Query, going to the "Add Column" section in Power Query, going to the "Time option" and selecting "Hour > Hour" from the dropdown list. Screenshot of the what I mean below.

time.png


The problem I am running into is that it has made a mistake in row 3131 which has caused all subsequent rows to be incorrect as well. Screenshot below.

Screenshot 2024-01-26 172322.png


I could easily draw up a different non-Power Query solution to this problem, but I am trying to make better use of these tools and am wondering: 1. Why would Power Query incorrectly parse this information? 2. What can be done within Power Query to correct this? I would love to be able to use this Power Query function in the future but errors like this in a relatively small data set would make that very challenging.

I hope that I have adequately explained my problem here, but I would be happy to offer any clarification that would be of use in the comments.

Thanks for any assistance!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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