View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Calculate the number of days between two dates

Dates are right aligned. It would seem you have the date format set to the
European system dd/mm/yyyy rather than the US one of mm/dd/yyyy. This
explains why the first one gets aligned to the right - it is treated as
text. Like most Canadians, I use dd/mm/yyyy so if I type 02/14/2007 in a
cell I get text.

What date format do you wish to use, dd/mm/yyyy or mm/dd/yyyy? You can use
Format | Format Cell ; specify Custom and set either dd/mm/yyyy h:mm or
mm/dd/yyyy h:mm

Try again and tell us what happens
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Luca Villa" wrote in message
ups.com...
This is what I do:

I change the cell format of the entire A column to "date" -
"03/14/2001" (there isn't a format identical to "02/14/2007 18:20").
I type "02/14/2007 18:20" in A1 and I press enter. The date stay
aligned on the left.
I type "03/03/2007 20:32" in A2 and I press enter. Now something
strange happen: while the date I entered is apparently like that in A1
here the date gets aligned to the right and automatically changes to
"3/3/2007".
I change the cell format of B1 to numeric.
I type "=A2-A1" in B1 and I press enter.
B1 contains "#VALORE!"