Skip to main content
Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Search instead for
Did you mean:
Not applicable

## Difference of YearMonth format

Hello,

I have this table:

ID | StartDate | EndDate | Result  | Expected Result

1  | 201306    | 201710     | 174.5    | 172

2  | 201505    | 202006     | 61.9      | 61

3  | 201608    | 202108     | 60.8      | 60

4  | 201308    | 201708     | 48.7      | 48

5  | 201309    | 201808     | 59.83    | 59

6  | 201410    | 202409     | 120.7    | 119

7  | 201608    | 201807     | 23.3      | 23

My goal is to find the duration between StartDate and EndDate in months. I figured out a way to do that by calculating the number of DAYS between these 2 days using this formula: (Result column)

(num(MonthYear_Mat)- num(MonthYear_Dis) )/30

but this result has a major error that it count every month as 30 days, and the result isn't 100% accurate.

How to obtain the Expected result?

Thanks,

1 Solution

Accepted Solutions
Partner - Master III
1 Reply
Partner - Master III
Community Browser