change 20071201 to date

S

Stampertje

Hello. My little problem is that I want to change this date format: 20071201
to 2007-12-01, because excels doesn't recognize 20071201 as a date. I'm
Dutch. I know the Dutch solution to the problem. It's:
=DATUMWAARDE(RECHTS(A1;2)&"-"&DEEL(A1;5;2)&"-"&LINKS(A1;4))
However, I cannot make the translation work on an English version of excel.
(...=DATEVALUE...?)
Can anyone help me out? Thanks in advance.
 
M

Max

Maybe try Data > Text to columns ?

Select the "dates" col
Click Data > Text to columns
Click Next > Next
In step 3 of the wiz,
Check "Date", then select: YMD from the droplist
Click Finish
 
S

Stefi

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))
and custom format the result cell like "yyyy-mm-dd"!

Regards,
Stefi

„Stampertje†ezt írta:
 

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

Similar Threads

Can I Change the language of an excel formula 3
date syntax 2
Counting (sub)totals 4
possible DATEVALUE bug, workaround needed 9
Date Format 1
DATEVALUE 2
How to Change Language 2
Date? 3

Top