date

  • Thread starter Thread starter chris lane
  • Start date Start 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
 
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
 
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
 

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

Back
Top