Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Date function doesn't show correct date

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US
Well, it seems to me that some computers, date function is not shown correctly:

On my machine, when I entered:

=Month(Now()) => it shows 1, which is January, is not correct

=day(Now()) => it shows #REF? , which is not correct.

but some computer I checked, it worked alright. All have MS2K installed on the machine....

What is missing that caused the misfunction of the date worksheet functions? Or how to solve it?

Thanks,
Phuong
 
Yes, I sure do.

An interesting this is that:
when I do:

=MONTH(NOW()) =>it gives me '3'
When I do:
=TEXT(MONTH(NOW()),"mmmm") => it gives me 'January'

all set to 'General'
 
You try to format Jan 3, 1900 (MONTH(NOW()=3, which is that date in date convention).
Use =TEXT(NOW(),"mmmm") and all will work.

combo
 
If the cell is corrupt(you can try the function in a far way cell if it works fine), go to Edit -> Clear -> All.
And retype the function.
 
"=MONTH(NOW()) =>it gives me '3'
When I do:
=TEXT(MONTH(NOW()),"mmmm") => it gives me 'January'"

This is not surprising:

Your 1st formula picks up the format of the cell (ie general and therefore shows the month NUMBER as it's supposed to

Your 2nd formula forces the cell to be TEXT by using the TEXT formula and therefore will show exactly what is entered into it. In this case, you have used the TEXT function to format the date before it is entered into the cell (which is forced to be text by the text function) so you see the mmmm format of the month. If you look up date formats in the help file, you will see that there are actually at least 3 seperate ways of showeing the month:
m 1
mmm Jan
mmmm January Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Phuong,

in your first posting you said ...

" On my machine, when I entered:

=Month(Now()) => it shows 1, which is January, is not correct "

and then your next posting said ...

"An interesting this is that:
when I do:

=MONTH(NOW()) =>it gives me '3' "

so , which is true????????

Glenn.

 
Glenn,

Yes, i tried in on my machines at work, AND at home. at work, when i typed =Month(Now()), it gives me 1

and at home, when I typed:
=Month(now()), it gives me 3.

It's an interesting fact, but it's true. I'll check the computer date when I get back to my office.
Thank you all.

-Phuong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top