Solved

Convert days to months

Posted on 2002-05-16
10
1,967 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
  • 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
 
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now