Solved

Convert days to months

Posted on 2002-05-16
10
1,973 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
Comment
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

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

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

Expert Comment

by:nico5038
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

by:senan072100
ID: 7015050
the result of substracting to date variables is number, so what about dividing it by 30 !!!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 54

Expert Comment

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

Hi mgrattan ;-) !

Nic;o)
0
 
LVL 4

Author Comment

by:nmilmine
ID: 7015124
Thanks

Neil
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 7015145
You're welcome nmilmine.

Hi Nico!

Mike.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7015161
(off record, sorry Neil)

Mike,

Missed your comments for a while !

Nic;o)
0
 
LVL 14

Expert Comment

by:mgrattan
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

by:senan072100
ID: 7015695
Magrattan,, thanks,,, useful function.
0
 
LVL 14

Expert Comment

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

Mike.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server views 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 Access…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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

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

Join & Ask a Question