View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Days between dates

Try this:

=INT(G10)-INT(F10)+1

Format as GENERAL or NUMBER

--
Biff
Microsoft Excel MVP


"Linda RQ" wrote in message
...
Whoops....One small problem. My date fields are formated as Date and Time
behind the scenes, I imported this data from access. I did change the
format to just showing the date but I don't think this removes the time it
only changes how it looks. How can I get this formula to ignore the time
part of the Date or could there be another explaination? I have probably
randomly checked 1/4 of the records and this is the only one that is
giving
a goofy answer.


1/10/07 11:11 PM
1/18/08 12:11 PM

Result is 9 which is correct for what I am doing

but

1/27/08 5:00 AM
1/30/08 6:30 PM

Result is 5 and it should be 4

Thanks,
Linda




"Linda RQ" wrote in message
...
Crap Bob! That worked. I thought I tried every variation of cell minus
cell and when I found info about the DAYS360 function, I thought I would
be like a real programmer and try it. I'll just bother the group right
off the bat next time when it's something I know is easy for you guys.

Thanks,
Linda

"Bob Phillips" wrote in message
...
=G10-F10+1

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Linda RQ" wrote in message
...
Sorry Guys,

I have looking around on a bunch of websites on calculating days
between
dates (sort of) and it's almost working but I need it to really work.

I need a cell to return the number of days a patient was on a
ventilator. Here is my latest try. I get the right number but it's a
negative number

=DAYS360(G10,F10)-1

Start Date 1/10/08
End Date 1/18/08

The answer should equal 9. I know the difference between these 2 is 8
but we count each day the patient is on the vent as if it were a whole
day.

So what do I need to do to get this answer from these dates?

Thanks,
Linda