Solved All months of year=30

FahadTiger

Member
Local time
Today, 23:24
Joined
Jun 20, 2021
Messages
115
Hi Expert..
Is there a function through which all months can be considered to have 30 days, so that when I subtract a first date from a second date, the months are considered to have 30 days? so i get the Result of days
I can do it with a query but can it do it with vba
thank you All
 
o i get the Result of days

I don't understand that exactly. But hey, has that ever stopped anyone on this forum? Use the DateDiff to find total days:


RemainingDays: DateDiff("d", [StartDate], [EndDate]) MOD 30

Then get the remainder when you divide by 30 using MOD.

 
Hi Expert..
Is there a function through which all months can be considered to have 30 days, so that when I subtract a first date from a second date, the months are considered to have 30 days? so i get the Result of days
I can do it with a query but can it do it with vba
thank you All
just curious, why wouldn't you want the actual number of days?
 
Will this work?
no...
1679619860599.png
 
I don't understand, what do you expect from the example you listed. Better yet, give me expectations for these 5 examples:

2022-01-01, 2022-01-29
2022-01-01, 2022-01-30
2022-01-01, 2022-01-31
2022-01-01, 2022-02-01
2022-01-01, 2023-01-01
 
You are right..but my client has a lot of workers and he wants to count 30 days per month to calculate salaries..this is how the agreement with them..honestly, I did not come across such an agreement

thank you plog

don't understand, what do you expect from the example you listed
 

Users who are viewing this thread

Back
Top Bottom