cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rich2
Resolver I
Resolver I

Calculated Fields diffinmonths account for half a month

I have a "start date" and "end date" with a calculated column using the diffinmonth to give me the amount of months. This works great if you go from 1/1/2022 to 2/1/2022. But if the start and end dates are 1/1/2022 to 2/15/2022 it doesn't show the .5/half of month. I've tried making the calculated column Whole number, text and decimal. The column type doesn't matter it doesn't account for the 15 days of the half month. Do you have any suggestions or thoughts?

Very much appreciate.

1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User
Super User

Hi @Rich2,

This is by design for the DIFFINMONTHS, but there's a workaround. Have the column type as Decimal, then use DIFFINDAYS expression and divide by 30. Might not be as precsie because some months have 28/29 and 31 days but I would say it's pretty accurate for general usage to determine difference in months:

EricRegnier_0-1648759564543.png

Hope this helps!

 

View solution in original post

2 REPLIES 2
EricRegnier
Super User
Super User

Hi @Rich2,

This is by design for the DIFFINMONTHS, but there's a workaround. Have the column type as Decimal, then use DIFFINDAYS expression and divide by 30. Might not be as precsie because some months have 28/29 and 31 days but I would say it's pretty accurate for general usage to determine difference in months:

EricRegnier_0-1648759564543.png

Hope this helps!

 

Rich2
Resolver I
Resolver I

Eric,

 

This gives me a great base to start with. Thanks for your time.

 

Have a great weekend!

Rich

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,109)