Datedif()

B

Brad

Currently day, month, year and combinations of these can be used with this
function. Please add week to this function.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...6-6457bd8c0d86&dg=microsoft.public.excel.misc
 
B

Bernard Liengme

This is a newsgroup of your peers. It is not somewhere that Microsoft goes
for 'advice'
best wishes
 
B

Brad

I agree that this is a newsgroup, but why have a dropdown for "suggestion for
microsoft" if not to provide for suggestions - and it appears people can vote
for the suggestion. What am I missing?
 
B

Brad

The function datedif()

has the format
=datedif(date1,date2,"d") for number of days between the two dates
or
=datedif(date1,date2,"m") for number of complete months between the two dates
or
=datedif(date1,date2,"y") for number of complete years between the two dates
it even allows other combinations - but not complete weeks.

please note that date1 has to be less than date2 for this funtion to work.

I agree that there are other ways to "get" the answer, but if the function
is there - having a "week" selection doesn't seem unreasonable.
 
P

Peo Sjoblom

You are right, one tends to forget that a majority of people posting here
is using the web interface and not a newsreader.

Btw they won't touch that function with a 10 foot
pole. It is only documented in Excel 2000.


Weeks are easy enough,

=(end_date-start_date)/7

or maybe include round so you don't get any decimals

--


Regards,


Peo Sjoblom
 
D

Duke Carey

Peo -

I suspect you are right about them not 'touching' datedif; however, it is
very interesting that there is a robust DATEDIFF() function in SQL Server
that IS documented and that DOES have a WEEK argument. Matter of fact, it
does QUARTERS, HOURS, MINUTES, SECONDS, and MILLISECONDS, too.

Odd, eh?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top