Solved

Convert days to months

Posted on 2002-05-16
10
1,968 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Normalization of a table 19 75
object variable or with block not set 6 31
Trying to force an answer in a combobox 7 18
Formatting Excel Data as Table from Access 11 19
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

825 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