I need to change 4/21/1998 dates to 21/4/1998 HOW?

R

ROn Stalenberg

Having extracted data from an uncooperative piece of software, it gave me the
dates of birth in the format: 4/21/1998. I need to calculate the age of these
people -THis can be done using DATEDIF(F2,NOW(),"y")&" years,
"&DATEDIF(F2,NOW(),"ym")&" months" - - but seems the date format required
for the calculation is 21/4/1998.

How can I either fix the formula or change the dates into the required format?
 
A

Ashish Mathur

Hi,

Select the cell and go to Data > Text to columns. Click on Next twice and
on the third screen, under the column data format, select MDY. Now click
finish.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
B

Bob Phillips

Try this

=DATE(RIGHT(F2,4),LEFT(F2,FIND("/",F2)-1),MID(F2,FIND("/",F2)+1,FIND("/",F2,FIND("/",F2)+1)-(FIND("/",F2)+1)))
 
R

ROn Stalenberg

NOPE - Arthur.
Doesn't work Seems the formatting of the original date data is totally
inconsistent. The second hint from Bob Phillips works for SOME of the data,
but not all - Gives me a "VALUE" error

Ron
 
R

ROn Stalenberg

Thanks Bob,
That works for SOME of the data, but not all. Have tried the "Format
/Cells/Date/ method to change the date form at of the data to lots of
different fomats, but nothing seems to change the format of the original
data. Some of it even has spaces between digits and / of the dates.

Ron
 
R

ROn Stalenberg

MORE INFORMATION BOB:

The dates your formula DOESN'T work on are those that convert to a straight
numerical value when i change the format of the dates to text. It DOES work
for those dates that remain as dates when i format the column as text

Does that help?

Ron
 

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

Top