You should always aim at converting something that looks like a date into a date. A date will always remain a date and you can display it in whatever format you want. It will even survive the transition from one language to another.
So if your source is a date you are fine. If it is a string, I would do this:
- convert the source string using =DATEVALUE() ... this will work if the month name is in the system language
- if temporarily changing your system language is not an option, the next would be =DATE(yy,mm,dd) whereby the arguments must be created using =LEFT(...), =MID(...), =RIGHT(...)
eventually you must convert month names from one language to another like in the following example:
A1 contains JANFEBMAR...
A2 contains JÄNFEBMÄR...
conversion formula =MID(A2;FIND("MAR";A1);3)
Edit in reply to Kyle's comment:
Besides the fact that the German(Austria) locale would immediately recognize this string as a date, let's split the problem into chewable pieces. Your date string is asumed in A1
- the time part is easy: it is an additive term
TIMEVALUE(RIGHT(A1;8))
splitting the date we have to fight against seperators at dynamic locations. The positions of the delimiters can be found by
2a) =FIND("/";A1;1)
... find position of first delimiter
2b) =FIND("/";A1;4)
... 2nd delimiter, asuming the first figure can be only 1 or 2 char's and no blanks before - alternatively we must replace the constant "4" by term (2a)+1
2c) =FIND("/";A1;FIND("/";A1;1)+1)
... safer version of (2b)
now we have most things ready to construct our left's mid's and right's
3a) =LEFT(A1;FIND("/";A1;1)-1)
... 1st figure ... length of (2a)-1
3b) =MID(A1;FIND("/";A1;1)+1;FIND("/";A1;FIND("/";A1;1)+1)-FIND("/";A1;1)-1)
... 2nd figure ... start:=(2a)+1, num_Chars=(2c)-(2a)-1
3c) =MID(A1;FIND("/";A1;FIND("/";A1;1)+1)+1;4)
... 3rd figure ... start:=(2c)+1, num_chars = 4 - asuming the year is always 4 digit. the more abstract case would be a (3b) with (2c) being a =FIND()
for the first blank
How to interpret especially the 1st and 2nd figure (i.e. MM/DD or DD/MM) is up to you.
now comes the fun part, i.e. concatenating all these formulae into one monster to get the date
4a) start by entering =DATE(1;2;3)
4b) replace 1 by (3c), 2 by (3b), 3 by (3a) ... do not copy the leading "="
4c) =DATE(MID(A1;FIND("/";A1;FIND("/";A1;1)+1)+1;4);MID(A1;FIND("/";A1;1)+1;FIND("/";A1;FIND("/";A1;1)+1)-FIND("/";A1;1)-1);LEFT(A1;FIND("/";A1;1)-1))+TIMEVALUE(RIGHT(A1;8))
You don't see the time, only the date! .... Remember to give a custom cell format displaying date AND time, i.e. "DD.MM.YYYY hh:mm:ss"
OK ... this formula is absolutely unreadable and un-understandable, so you might want to display intermediate results in (temporary) fields/columns.
And this formula will work only if the input string is more or less strictly formated. It can cope with some added blanks at the first and second numbers, but starting with YYYY it becomes tricky. Then other concepts need to be included, like removing all blanks by =SUBSTITUTE(A1;" ";"")
before all others, etc. etc.
Hint: I am always building complex formulae like this: isolate the terms in individual cells and later merge them to one large formula