View Single Post
  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Dates in XL are stored as integer offsets from a base date (by default,
12/31/1899 in the 1900 date system).

So

=TODAY()

returns the value 38369 (try formatting the cell as General).
MONTH(TODAY()) returns the month number for the serial date 38369, or 1.
Month(TODAY()+45) returns the mont for the serial date 38414, or 3.

But when you format 3 as a date ("mmm"), XL interprets the 3 to mean 3
days after 12/31/1899 or 1/3/1900, so returns "Jan".

If you want to display "Mar", use the formula

=TODAY() + 45

and format it as "mmm"



In article ,
Compass Rose wrote:

When I enter the formula =MONTH(TODAY()) and the cell formatting is set to
General, the cell contains a 1.
When I change the cell formatting to Custom "mmm", the cell displays "Jan".
So far, so good.
When I enter the formula =MONTH(TODAY())+3 and the cell formatting is set to
General, the cell contains a 4. I would assume that this is the correct
formula for showing the month which is 3 months hence. When I change the
formatting to Custom "mmm", I would expect the cell to contain "Apr", but it
doesn't. It still displays "Jan".
When I enter the formula =MONTH(TODAY()+45) and the cell formatting is set
to General, the cell contains a 3. I would assume that this is the correct
formula for showing the month which is 45 days hence. When I change the
formatting to Custom "mmm", I would expect the cell to contain "Mar", but it
doesn't. It still displays "Jan".