View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Basilisk96 Basilisk96 is offline
external usenet poster
 
Posts: 37
Default Calculate the number of days between two dates

I second that. For the dates, I entered:
02/14/2007 18:20
03/03/2007 20:32
in A1 and A2, then entered a simple formula "=A2-A1" and formatted the
formula cell as Number with 6 digits.
The answer is 17.091759

Cheers,
-Basilisk96


On Nov 11, 8:56 am, "Bernard Liengme"
wrote:
In English this is a VALUE error that results from trying to do arithmetic
on text. You may need to re-enter the dates to ensure they are in real date
format.
To check this, format on of your date cells as Number; it should display as
a number close to 39,000. Tell us what you get.
best wishes
--
Bernard V Liengme
Microsoft Excel MVPwww.stfx.ca/people/bliengme
remove caps from email

"Luca Villa" wrote in message

ups.com...



Bernard Liengme ha scritto:


=A2-A1 and format General


it gives "#VALORE!" (my Excel is in italian), perhaps because the
format of the dates is not recognized. I also tried to browse the
various date formats even english but I didn't find one that coincide.


or use DATEDIF (undocumented function) - details at
http://www.cpearson.com/excel/datedif.aspx
best wishes


I tried =DATEDIF(Date1, Date2, Interval) (precisely =DATEDIF(A1, A2,
d) but it doesn't accept the formula, selecting "A1, A2, d" as if it
doesn't accept them.


I suspect that Microsoft likes to translate the formula commands in
addition to the program interface!