date

C

chris lane

Hi All
I live in South Africa, and I have an interesting problem that persists
in
Excel 2003 and 2007.
=TEXT(NOW(),"dd mmm yyyy") returns 15 Dec 2006
=month(now()) returns 12
=text(month(now()),"MMMM") returns January
=year(now()) returns 2006
=text(year(now()),"yyyy") returns 1905
Why would this be?
Thanks
Chris
 
B

Bernie Deitrick

Chris,

=text(month(now()),"MMMM")

should be

=text(now(),"MMMM")

and

=text(year(now()),"yyyy")

should be

=text(now(),"yyyy")
or just
=year(now())

Otherwise, you are calcing the month of the 12th day after 12/31/1899, or the year of the 2,006th
day after 12/31/1899. That is just how dates work in Excel.

HTH,
Bernie
MS Excel MVP
 
C

chris lane

Thanks very much, Bernie


Bernie said:
Chris,

=text(month(now()),"MMMM")

should be

=text(now(),"MMMM")

and

=text(year(now()),"yyyy")

should be

=text(now(),"yyyy")
or just
=year(now())

Otherwise, you are calcing the month of the 12th day after 12/31/1899, or the year of the 2,006th
day after 12/31/1899. That is just how dates work in Excel.

HTH,
Bernie
MS Excel MVP
 
Top