Power Query Date.EndOfMonth Function Issue

jland31

New member
Joined
Jul 22, 2016
Messages
1
Reaction score
0
Points
0
Hi,

Is anyone having issues with Date.EndOfMonth function with the June 2016 update? In my case, it's returning first date of next month instead of the last date of the month shown on the date selected.

Thanks for your help!

Jorge.
 
I just tested and maybe know what the issue is. Is your date input for the column an actual date and not a datetime? When I insert a table of dates from Excel, PQ leaves them an ambiguous column that looks like a datetime, e.g., 7/25/2016 12:00:00 AM. If I create the Date.EndOfMonth off of that column, I get what you're describing, where 7/25/2016 12:00:00 AM turns into 8/1/2016 12:00:00 AM. However, if I change the input column's type to a date first, I get the expected result from 7/25/2016 to 7/31/2016.

Not sure why it works that way, but PQ does like explicitly defined types.
 
Back
Top