Solved

Convert days to months

Posted on 2002-05-16
10
1,966 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

760 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

21 Experts available now in Live!

Get 1:1 Help Now