Day part of date

S

Sandy

In B2 I have 27/11/08
In A2 I am trying to extract the day as ddd (Thu in this case)

If I use =Day(B2) in A2 with the cell formatted as ddd I get Fri.
I tested in another cell with =B2 formatted as ddd - dd mmm yyyy and I
correctly get Thu - 27 Nov 2008. Why does the cell A2 result fail, and is
there an easy way to do this?

Sandy
 
R

RagDyeR

Since you've already formatted A2 to "ddd", use
=B2
as the formula in A2.
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

In B2 I have 27/11/08
In A2 I am trying to extract the day as ddd (Thu in this case)

If I use =Day(B2) in A2 with the cell formatted as ddd I get Fri.
I tested in another cell with =B2 formatted as ddd - dd mmm yyyy and I
correctly get Thu - 27 Nov 2008. Why does the cell A2 result fail, and is
there an easy way to do this?

Sandy
 
S

Sandy

RD
Certainly did the trick. Don't understand why =Day(B2) didn't work though.
Many thanks.
Sandy
 
R

RagDyeR

FWIW, in case you're interested in why Fri was returned,
if you read the Help file for the Day() function,
you'll see that the function expects a serial number as it's only argument.

If you format A2 to General, your formula:
=Day(B2)
returns 27.

To the Day() function, that means - the 27th day starting at 1/1/1900,
which was a Friday.
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

RD
Certainly did the trick. Don't understand why =Day(B2) didn't work though.
Many thanks.
Sandy
 
S

Sandy

RD
Thank you - well explained!
Sandy

RagDyeR said:
FWIW, in case you're interested in why Fri was returned,
if you read the Help file for the Day() function,
you'll see that the function expects a serial number as it's only
argument.

If you format A2 to General, your formula:
=Day(B2)
returns 27.

To the Day() function, that means - the 27th day starting at 1/1/1900,
which was a Friday.
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

RD
Certainly did the trick. Don't understand why =Day(B2) didn't work though.
Many thanks.
Sandy
 

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

Top