Hi Epinn
You need to invest in a straightjacket <vbg>
I hear what you say about Regional settings, but as the OP had said she
used 05.01.07 and wanted 05.Jan.07 I inferred that her Regional settings
were the same as my UK settings of dd/mm/yy.
For you, I presume you would not enter as 05.01.07, but would enter as
01.05.07 if you were entering a date of 05 January 07, and in which case
the result would turn out as 01.Jan.07 having used the formula.
If one is going to distribute Workbooks internationally, then in my
opinion one should adopt the International Standard ISO 8601 for dates
which is to use yyyy-mm-dd and then there can be no ambiguity.
Not sure if [$-409] is of any help. No clue what it is.
No this won't help in this scenario Epinn.
What this does is allows you to use the language of the Regional
Settings for displaying the date
=TEXT(SUBSTITUTE(A1,".","/"),"[$-409]dd.mmmm.yy") or $-809 for UK will
return 01.January.07
=TEXT(SUBSTITUTE(A1,".","/"),"[$-040c]dd.mmmm.yy") will return
01.janvier.07 (France)
=TEXT(SUBSTITUTE(C14,".","/"),"[$-041d]dd.mmm.yy") will return
01.januari.07 (Sweden)
--
Regards
Roger Govier
I am typing with one hand. I have to say something important.
Text to column + custom format (dd.mmm.yyyy) is perfect for me. I say
this method is universal i.e. independent of the regional setting.
Substitute formula + custom format may work for some but not all users
i.e. dependent of regional setting. If it works on the OP's PC, then
what will happen if he/she distributes the worksheet to a user with a
different regional setting? Not sure if [$-409] is of any help. No
clue what it is.
Okay, I said it.
Epinn
Roger,
Will you forgive me. I am going backwards and I'll make a point to shut
up. I learned all the fancy formulae to sort text, numbers, number and
text etc. and I have forgotten something as simple as TEXT and DATE.
I am going to post the correct formula for the record. Of course, we
all should use your simple solutions.
A1: 01.03.2007 text format dd.mm.yyyy
B1: =TEXT(DATE(RIGHT(A1,4),MID(A1,4,2),LEFT(A1,2)),"dd.mmm.yyyy")
returns 01.Mar.2007 (text format).
Must have leading 0 in A1 for this formula to work. e.g. 01 and not
just 1, 03 and not just 3. 1.3.2007 won't work.
This formula is *independent* of my regional setting.
If I use the SUBSTITUTE "/" method, then the dd.mm.yyyy format in A1
will be over-ridden by my regional setting which is m/d/yyyy i.e. I will
get Jan instead of Mar.
Please ignore my very first formula. Don't mean to confuse anyone. My
apology to the OP. Now I have to go and find something to tie up my
fingers to prevent further typing unless critical.
Epinn
Sorry, my second formula only works for January. I am fixing it now.
Epinn
A1=05.01.2007
If it is date format, then you can use the formula I gave earlier.
If it is text, then try this:
In B1 key in:
=LEFT(A1,3)&TEXT(MID(A1,4,2),"mmm")&RIGHT(A1,5) This is assuming that
you always have leading zeros i.e. 05 instead of 5 and 01 instead of 1.
Don't know if Roger is up yet. In the meantime, can you tell us what is
your regional setting for date. Go to control panel>regional and
language options>regional options What does short date look like?
You are in good hands with Roger.
Epinn
hi Roger/Epinn,
thanks for your reply. But i already did a report that my format is
05.01.2007 and my boss wants to retain that format.
my problem is, i can't use the formula that Epinn gave to me because i
still have to convert it 01/05/07. is there a way that i can convert it
directly using this format 05.01.2007?