Excel 2007 days and dates issue? [Solved/Closed]

Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I was working to have the week numbers in excel and i step into a question when i entered in cell "B1" the date 05/1/2010 and i changed the cell format to custom -> Type: dddd and it said "Saturday" but when I used the =DAY(B2) and the same cell format it said "Sunday" and the same happens for all other dates.

Does anybody know if this is a glitch or i am doing something wrong.

Thanks a lot in advance.

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
DAY() is supposed to give you the day of the month (1-31)
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Thanks. Now I get it, that means that since excel understands the dates counting from 1/1/1900 as date 1 and 1/1/1900 was a Sunday and so on. Thanks a lot i was confused.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
right on money. day(), month() and year() are useful to get the parts of the date. If you want the weekday of a day, you have to use function WEEKDAY(). read the help on it though as it has an optional 2nd parameter which decide what is to be considered as first day of the week

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!