Solved

# Convert days to months

Posted on 2002-05-16
1,969 Views
Last Modified: 2011-04-14
Hi Everyone

I have a formula that calculated the no of days between 2 dates.

What I want to do is convert the no of days into complete months

Thanks
Neil
0
Question by:nmilmine
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• Learn & ask questions
• 4
• 3
• 2
• +1
10 Comments

LVL 14

Accepted Solution

mgrattan earned 50 total points
ID: 7015047
Use the DateDiff function:

datediff("m",<date1>,<date2>)
0

LVL 54

Expert Comment

ID: 7015049
Hi Neil,

Just checkout the date/time routines at: www.mvps.org/access

BTW complete months from days will differ depending on a startdate. e.g. before and after the 28th of februari...
so Datediff("m",..) could do the trick for you.

Nic;o)
0

Expert Comment

ID: 7015050
the result of substracting to date variables is number, so what about dividing it by 30 !!!
0

LVL 54

Expert Comment

ID: 7015052
Just typed too much too slow.... ;-(

Hi mgrattan ;-) !

Nic;o)
0

LVL 4

Author Comment

ID: 7015124
Thanks

Neil
0

LVL 14

Expert Comment

ID: 7015145
You're welcome nmilmine.

Hi Nico!

Mike.
0

LVL 54

Expert Comment

ID: 7015161
(off record, sorry Neil)

Mike,

Missed your comments for a while !

Nic;o)
0

LVL 14

Expert Comment

ID: 7015175
<Off topic again>

Hi Nico;

I've been poking my head into EE now and then but I'm so busy at work with Access, Excel VBA, and Essbase projects that I hardly have any time to visit.

Looks like you've been spending quite a bit of time here though!  If you like, email me at outuvtime at yahoo dot com.

Mike.
0

Expert Comment

ID: 7015695
Magrattan,, thanks,,, useful function.
0

LVL 14

Expert Comment

ID: 7016503
You're quite welcome....

Mike.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

#### 730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.