[mso] Re: Date format in Excel

Rajesh,

I was searching thru my stuff and found the following:

=3DTEXT(A1,"mmmm
")&DAY(A1)&IF(INT(MOD(DAY(A1),100)/10)=3D1,"st",IF(MOD(DAY(A1),10)=3D1,"s=
t",IF(M
OD(DAY(A1),10)=3D2,"nd",IF(MOD(DAY(A1),10)=3D3,"rd","th"))))&TEXT(A1,", =
yyyy")

Which has an output of "October 30th, 2007"

With some modification, you should be able to get what you are looking =
for.

HTH
Jim

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On =
Behalf
Of Rajesh V - Program Leader(BC) - SIS
Sent: Tuesday, October 30, 2007 8:29 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Date format in Excel
Importance: High


Thanks a ton Mr David.  Your explanation is very clear.  But the second =
=3D
formulae which u had given is not providing the correct result.  Try =3D
giving the date as 13-oct-2007, the result given by the formulae is 13rd =
=3D
oct 2007 which isn't correct.  Rather it should be 13th oct 2007.

Thanks a lot again.

___,,,,_{=3DF4=3DBF=3DF4}_,,,,___
Thanks & Regards
Rajesh V

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On =3D =
Behalf
Of David Smart
Sent: Tuesday, October 30, 2007 6:52 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Date format in Excel

Aha, I see.

When I do it in Excel 2003, it does not quite keep the format.  My =
data=3D20
entry is 01st Oct 2007, but the next cell has 2nd Oct 2007 (i.e. it =3D
doesn't=3D20 hold on to the leading zero).

However, it is very neat.  I didn't realise it would do that.

But ... notice that the dates are left justified.  I.e. Excel has not =
=3D
stored=3D20 them as dates, it's stored them as strings.  This might or =
might
not be=3D20 important for what you're doing, but it certainly means that =
Excel
=3D formats=3D20 are not involved.  Essentially, you can apply any =
format at all
to it=3D20 (currency, percentage, etc) and it'll still show you the =
string
that has =3D a=3D20 date in it.

You can demonstrate to yourself that it's not a date by putting a =3D =
formula
in=3D20 another cell to add 1 to the date in your cell.  You would =
expect to
get =3D the=3D20 next day (or the date serial number of the next day).  =
Instead,
you'll =3D get=3D20 #VALUE!.  Then try it on a cell with an actual date =
value in
it.

So, it's a nice thing that the drag handle does, but it isn't available =
=3D
in=3D20 the formatting.

However, lots of people have developed their own solutions to this =3D
problem=3D20 using VBA or complex formulas.  Do a Google search.  This =
one is
adapted =3D

from a formula I found here:=3D20
http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/  =
with=3D20
thanks to David Wasserman who contributed the original formula.

=3D3DTEXT(DAY(A1),"00")&IF(OR(MOD(DAY(A1)-1,10)>2,INT(DAY(A1)/10)=3D3D1),=
"th"=3D
,CHOOSE(MOD(DAY(A1),10),"st","nd","rd"))&TEXT(A1,"=3D20
mmm yyyy")

Hmmm, Stan Scott on the same page had a shorter version.  Again, I've =
=3D
added=3D20 the bits to get the rest of the date

=3D3DTEXT(DAY(A1),"00")&INDEX({"st","nd","rd","th"},MIN(RIGHT(DAY(A1),1),=
4)=3D
)&TEXT(A1,"=3D20
mmm yyyy")



Regards, Dave S

----- Original Message -----=3D20
From: "Rajesh V - Program Leader(BC) - SIS" =3D =
<rajesh.v@xxxxxxxxxxxxxxxxxxx>
To: <mso@xxxxxxxxxxxxx>
Sent: Tuesday, October 30, 2007 11:39 PM
Subject: [mso] Re: Date format in Excel


> Thanks for your reply Mr David
>
> See when we enter the date in excel as 01st Oct 2007 and use the fill=20
> handle and drag it down, excel automatically recognises the series and =

> fills the same as 02nd oct 2007, 03rd oct 2007 etc.  Hence I put forth =

> =3D
a
> question that since excel is able to internally recognise the formats, =

> is there by any chance we change the format as above.
>
> When I enter the date as 01-oct-2007 and set an format to that, it=20
> should change to 01st oct 2007.
>
> Hope I am clear now.
>
>
> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On=20
> Behalf Of David Smart
> Sent: Tuesday, October 30, 2007 6:04 PM
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Re: Date format in Excel
>
> Sorry, not with you.
>
> What specific format does Excel recognise?
>
> What is the issue you have with changing the format?
>
> Regards, Dave S
>
> ----- Original Message -----=3D3D20
> From: "Rajesh V - Program Leader(BC) - SIS"=20
> <rajesh.v@xxxxxxxxxxxxxxxxxxx>
> To: <mso@xxxxxxxxxxxxx>
> Sent: Tuesday, October 30, 2007 2:49 PM
> Subject: [mso] Re: Date format in Excel
>
>
>> Thanks for this advise.  But excel recognises the format and when we
> use
>> the fill handle, it automatically generates the sequence in the way=20
>> which I require.  The only issue is when I want to change the format. =

>> Please advise
>>
>>
>> -----Original Message-----
>> From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On=20
>> Behalf Of David Smart
>> Sent: Tuesday, October 30, 2007 3:17 AM
>> To: mso@xxxxxxxxxxxxx
>> Subject: [mso] Re: Date format in Excel
>>
>> You can have the leading zero on the day without trouble.  I think
> that
>> this=3D3D3D20
>> is one of the standard date formats.
>>
>> I don't believe there is any built-in Excel facility that will give
> you=3D3D3D20
>> "st", "nd", etc.
>>
>> Regards, Dave S
>>
>> ----- Original Message -----=3D3D3D20
>> From: "Rajesh V - Program Leader(BC) - SIS"=20
>> <rajesh.v@xxxxxxxxxxxxxxxxxxx>
>> To: <mso@xxxxxxxxxxxxx>
>> Sent: Tuesday, October 30, 2007 12:26 AM
>> Subject: [mso] Date format in Excel
>>
>>
>>> Hi All,
>>> I need the date format in excel to be as 01st Oct 2007, 02nd Oct =3D
2007
>>> etc.  Is it possible to set any custom value .  Please help.
>>>
>>> Thanks and regards
>>>
>>> Rajesh
>>>
>>>
>>>
>>> "Rajesh  V - Program Leader(BC) - SIS" =3D
<rajesh.v@xxxxxxxxxxxxxxxxxxx>
>>>
>>>
>>
> =3D
________________________________________________________________________
>> ___
>>>
>>> Visit us at www.sundaraminfotech.in
>>>
>>
> =3D
________________________________________________________________________
>> ___
>>>
>>> This E-mail may contain privileged information and is intended =3D
solely
>> for=3D3D3D20
>>> the addressee, and any disclosure of this information is =3D3D
> strictly=3D3D3D20
>>> prohibited, and may be unlawful.  If you have received this mail
> by=3D3D3D20
>>> mistake, please inform us immediately and delete this mail.  =3D
Any=3D3D3D20
>>> information expressed in this mail does not necessarily reflect the
>> views=3D3D3D20
>>> of SUNDARAM INFOTECH SOLUTIONS.  As per SUNDARAM INFOTECH
> SOLUTIONS's=3D3D3D20
>>> policy, unencrypted mail via Internet is not considered secure.
>>>
>>
> =3D
________________________________________________________________________
>> ___
>>>
>>> *************************************************************
>>> You are receiving this mail because you subscribed to
>> mso@xxxxxxxxxxxxx or=3D3D3D20
>>> MicrosoftOffice@xxxxxxxxxxxxxxxx
>>>
>>> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>>>
>>> To Unsubscribe from this group, visit the group's homepage and use
> the
>>
>>> dropdown menu at the top.  This will allow you to unsubscribe your
>> email=3D3D3D20
>>> address or change your email settings to digest or vacation (no
> mail).
>>> http://www.freelists.org/webpage/mso
>>>
>>> To be able to share files with the group, you must join our Yahoo
>> sister=3D3D3D20
>>> group.  This group will not allow for posting of emails, but will
>> allow=3D3D3D20
>>> you to join and share problem files, templates, etc.:=3D3D3D20=20
>>> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is
> for
>>
>>> FILE SHARING ONLY.
>>>
>>> If you are using Outlook and you see a lot of unnecessary code in
> your
>>
>>> email messages, read these instructions that explain why and how to
>> fix=3D3D3D20
>>> it:
>>> http://personal-computer-tutor.com/abc3/v28/greg28.htm
>>> =
*************************************************************=3D3D3D20
>>
>> *************************************************************
>> You are receiving this mail because you subscribed to
> mso@xxxxxxxxxxxxx
>> or MicrosoftOffice@xxxxxxxxxxxxxxxx
>>
>> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>>
>> To Unsubscribe from this group, visit the group's homepage and use =
=3D
the
>> dropdown menu at the top.  This will allow you to unsubscribe your
> email
>> address or change your email settings to digest or vacation (no =3D
mail).
>> http://www.freelists.org/webpage/mso
>>
>> To be able to share files with the group, you must join our Yahoo
> sister
>> group.  This group will not allow for posting of emails, but will
> allow
>> you to join and share problem files, templates, etc.:=20
>> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is =
=3D
for
>> FILE SHARING ONLY.
>>
>> If you are using Outlook and you see a lot of unnecessary code in =3D
your
>> email messages, read these instructions that explain why and how to
> fix
>> it:
>> http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> *************************************************************
>> "Rajesh  V - Program Leader(BC) - SIS" <rajesh.v@xxxxxxxxxxxxxxxxxxx>
>>
>>
> =3D
________________________________________________________________________
> _=3D3D3D
>> __
>>
>> Visit us at www.sundaraminfotech.in
>>
> =3D
________________________________________________________________________
> _=3D3D3D
>> __
>>
>> This E-mail may contain privileged information and is intended solely
> =3D3D3D
>> for the addressee, and any disclosure of this information is strictly
> =3D3D3D
>> prohibited, and may be unlawful.  If you have received this mail by =
=3D
=3D3D
> =3D3D3D
>> mistake, please inform us immediately and delete this mail.  Any =3D
=3D3D3D
>> information expressed in this mail does not necessarily reflect the =
=3D
=3D3D
> =3D3D3D
>> views of SUNDARAM INFOTECH SOLUTIONS.  As per SUNDARAM INFOTECH =
=3D3D3D=20
>> SOLUTIONS's policy, unencrypted mail via Internet is not considered =
=3D
=3D3D
> =3D3D3D
>> secure.
>>
> =3D
________________________________________________________________________
> _=3D3D3D
>> __
>> *************************************************************
>> You are receiving this mail because you subscribed to
> mso@xxxxxxxxxxxxx or=3D3D20
>> MicrosoftOffice@xxxxxxxxxxxxxxxx
>>
>> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>>
>> To Unsubscribe from this group, visit the group's homepage and use =
=3D
the
>
>> dropdown menu at the top.  This will allow you to unsubscribe your
> email=3D3D20
>> address or change your email settings to digest or vacation (no =3D
mail).
>> http://www.freelists.org/webpage/mso
>>
>> To be able to share files with the group, you must join our Yahoo
> sister=3D3D20
>> group.  This group will not allow for posting of emails, but will
> allow=3D3D20
>> you to join and share problem files, templates, etc.:=3D3D20=20
>> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is =
=3D
for
>
>> FILE SHARING ONLY.
>>
>> If you are using Outlook and you see a lot of unnecessary code in =3D
your
>
>> email messages, read these instructions that explain why and how to
> fix=3D3D20
>> it:
>> http://personal-computer-tutor.com/abc3/v28/greg28.htm
>> *************************************************************=3D3D20
>
> *************************************************************
> You are receiving this mail because you subscribed to =3D
mso@xxxxxxxxxxxxx
> or MicrosoftOffice@xxxxxxxxxxxxxxxx
>
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>
> To Unsubscribe from this group, visit the group's homepage and use the =

> dropdown menu at the top.  This will allow you to unsubscribe your =3D
email
> address or change your email settings to digest or vacation (no mail). =

> http://www.freelists.org/webpage/mso
>
> To be able to share files with the group, you must join our Yahoo =3D
sister
> group.  This group will not allow for posting of emails, but will =3D
allow
> you to join and share problem files, templates, etc.:=20
> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for =

> FILE SHARING ONLY.
>
> If you are using Outlook and you see a lot of unnecessary code in your =

> email messages, read these instructions that explain why and how to =
=3D
fix
> it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> *************************************************************
> "Rajesh  V - Program Leader(BC) - SIS" <rajesh.v@xxxxxxxxxxxxxxxxxxx>
>
> =3D
_________________________________________________________________________=
=3D
=3D3D
> __
>
> Visit us at www.sundaraminfotech.in
> =3D
_________________________________________________________________________=
=3D
=3D3D
> __
>
> This E-mail may contain privileged information and is intended solely=20
> =3D
=3D3D
> for the addressee, and any disclosure of this information is strictly=20
> =3D
=3D3D
> prohibited, and may be unlawful.  If you have received this mail by =
=3D
=3D3D
> mistake, please inform us immediately and delete this mail.  Any =3D3D =

> information expressed in this mail does not necessarily reflect the =
=3D
=3D3D
> views of SUNDARAM INFOTECH SOLUTIONS.  As per SUNDARAM INFOTECH =3D3D=20
> SOLUTIONS's policy, unencrypted mail via Internet is not considered =
=3D
=3D3D
> secure.
> =3D
_________________________________________________________________________=
=3D
=3D3D
> __
> *************************************************************
> You are receiving this mail because you subscribed to =3D
mso@xxxxxxxxxxxxx or=3D20
> MicrosoftOffice@xxxxxxxxxxxxxxxx
>
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>
> To Unsubscribe from this group, visit the group's homepage and use the =

> =3D

> dropdown menu at the top.  This will allow you to unsubscribe your =3D
email=3D20
> address or change your email settings to digest or vacation (no mail). =

> http://www.freelists.org/webpage/mso
>
> To be able to share files with the group, you must join our Yahoo =3D
sister=3D20
> group.  This group will not allow for posting of emails, but will =3D
allow=3D20
> you to join and share problem files, templates, etc.:=3D20=20
> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for =

> =3D

> FILE SHARING ONLY.
>
> If you are using Outlook and you see a lot of unnecessary code in your =

> =3D

> email messages, read these instructions that explain why and how to =
=3D
fix=3D20
> it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> *************************************************************=3D20

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
=3D or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the =
=3D
dropdown menu at the top.  This will allow you to unsubscribe your email =
=3D
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister =
=3D
group.  This group will not allow for posting of emails, but will allow =
=3D
you to join and share problem files, templates, etc.:  =3D
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for =
=3D
FILE SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your =
=3D
email messages, read these instructions that explain why and how to fix =
=3D
it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
"Rajesh  V - Program Leader(BC) - SIS" <rajesh.v@xxxxxxxxxxxxxxxxxxx>

_________________________________________________________________________=
=3D
__

Visit us at www.sundaraminfotech.in
_________________________________________________________________________=
=3D
__

This E-mail may contain privileged information and is intended solely =
=3D for
the addressee, and any disclosure of this information is strictly =3D
prohibited, and may be unlawful.  If you have received this mail by =3D
mistake, please inform us immediately and delete this mail.  Any =3D
information expressed in this mail does not necessarily reflect the =3D =
views
of SUNDARAM INFOTECH SOLUTIONS.  As per SUNDARAM INFOTECH =3D =
SOLUTIONS's
policy, unencrypted mail via Internet is not considered =3D secure.
_________________________________________________________________________=
=3D
__
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the
dropdown menu at the top.  This will allow you to unsubscribe your email
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister
group.  This group will not allow for posting of emails, but will allow =
you
to join and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for =
FILE
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your =
email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
No virus found in this incoming message.
Checked by AVG Free Edition.=20
Version: 7.5.503 / Virus Database: 269.15.13/1099 - Release Date: =
10/30/2007
10:06 AM

No virus found in this outgoing message.
Checked by AVG Free Edition.=20
Version: 7.5.503 / Virus Database: 269.15.13/1099 - Release Date: =
10/30/2007
10:06 AM
=20

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: