Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
robertoz
Advocate I
Advocate I

Date.EndOfYear(DateTime.LocalNow())

Dear all,

 

why Date.EndOfYear(DateTime.LocalNow()) PowerQuery is showing "rounded" date "1.1.2017 0:00:00" (Data Type = Date/Time)

Expected result shown should be "31.12.2016 23:59:59"

I understand, that behind "1.1.2017 0:00:00" in "31.12.2016 23:59:59,999..." but without knowing what is behind it can be confusing

 

thx.

Robert

2 REPLIES 2
KGrice
Memorable Member
Memorable Member

Are you using this in a calculation or something? I can't get the same result; I actually get what I would expect:

 

DateEndOfYear.PNG

 

 

Maybe it's handled differently in different versions? I'm a month behind the most recent version.

Hi,

Thanks.

Yes, i discovered it by using in calculation - I add a new column =  Date.EndOfYear(DateTime.LocalNow()). Different formats are showing it different:

If Date/Time OR Any is used then : 

1.1.2017 0:00:00

 

If Time OR Text format used then 

31.12.2016

 

your result is the result of the query - single value.

 

IT does not influence the calculation itself. It is "rounding" the date when shoving values in Column.

R.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors