string - Excel conversion of US date (text) to european date (date) -


i pasting data webpage excel sheet. european excel cannot understand american dates.... paste text.

the difference between , european dates day , month in different order. how "us text date" real date "european" excel can understand? reading dates doesn't work, year(), month(), day() not work on native textstring. string conversion must done first.

the third column to show problem. result af month function called on text in column "a". taking day month , therefore throws error when reaching 13th of september.

text (from web)       eu date (real date)            month(a1) 9/8/10 10:03 pm          8. sep 2010                    8 9/9/10 10:03 pm          9. sep 2010                    9 9/10/10 10:03 pm         10. sep 2010                   10 9/11/10 10:03 pm         11. sep 2010                   11 9/12/10 9:40 pm          12. sep 2010                   12 9/13/10 9:40 pm          13. sep 2010                   error 9/14/10 9:40 pm          14. sep 2010                   error 9/15/10 9:28 pm          15. sep 2010                   error 

if there no "conversion function" solution split m/d/yy 3 columns , create date that. if need splitting text day, month , year.

update answer.... lazarus came 1 works. first, split text in column year, month , day. combine them eg. using date function

  • year: mid(a2,find("/",a2,find("/",a2,1)+1)+1,find(" ",a2,1)-find("/",a2,find("/",a2,1)+1)-1)
  • month: mid(a2,1,find("/",a2,1)-1)
  • day: mid(a2,find("/",a2,1)+1,find("/",a2,find("/",a2,1)+1)-find("/",a2,1)-1)

assuming first date in cell a2, following convert european structure.

=date("2000"+mid(a2,find("/",a2,find("/",a2,1)+1)+1,  find(" ",a2,1)-find("/",a2,find("/",a2,1)+1)-1),  mid(a2,1,find("/",a2,1)-1),mid(a2,find("/",a2,1)+1,   find("/",a2,find("/",a2,1)+1)-find("/",a2,1)-1)) 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -