ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   excel, dates and days ... (https://www.excelbanter.com/excel-programming/319411-excel-dates-days.html)

Larry Levinson

excel, dates and days ...
 
right now, at 5:30 p.m. ET, on dec. 21 according to God, man, and my
operating system,

=DAY(NOW()) shows 21

so how come

=TEXT(DAY(NOW()),"Dddd") shows up as `Saturday?'


tia ...


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)

Frank Kabel

excel, dates and days ...
 
Hi
quite simple :-)
DAY(NOW())
returns 21. If this is interpreted as a date value it would be the
21-Jan-1900
(and this was a Saturday)

So use
=TEXT(NOW(),"Dddd")

or
=TEXT(TODAY(),"Dddd")

instead

--
Regards
Frank Kabel
Frankfurt, Germany
"Larry Levinson" schrieb im Newsbeitrag
...
right now, at 5:30 p.m. ET, on dec. 21 according to God, man, and my
operating system,

=DAY(NOW()) shows 21

so how come

=TEXT(DAY(NOW()),"Dddd") shows up as `Saturday?'


tia ...


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)




Chip Pearson

excel, dates and days ...
 
Larry,

The DAY Function return the day of month, and to day is the 21st
of November. The "dddd" format specifier in the TEXT function
returns the full day name. So all is right in your world.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Levinson" wrote in
message ...
right now, at 5:30 p.m. ET, on dec. 21 according to God, man,
and my
operating system,

=DAY(NOW()) shows 21

so how come

=TEXT(DAY(NOW()),"Dddd") shows up as `Saturday?'


tia ...


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)




Chip Pearson

excel, dates and days ...
 
I meant to add that the DAY function in your TEXT function
returns 21, the 21st day of Excel's 1/1/1900 based calendar,
which was a Saturday.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Chip Pearson" wrote in message
...
Larry,

The DAY Function return the day of month, and to day is the
21st of November. The "dddd" format specifier in the TEXT
function returns the full day name. So all is right in your
world.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Larry Levinson" wrote in
message ...
right now, at 5:30 p.m. ET, on dec. 21 according to God, man,
and my
operating system,

=DAY(NOW()) shows 21

so how come

=TEXT(DAY(NOW()),"Dddd") shows up as `Saturday?'


tia ...


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)







All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com