Excel numbers--

G

gnolamar

I received this formula for changing regular unformatted
dates to a date field. =DATA(RIGHT(A1,4),LEFT(A1,1),MID
(A1,2,2)

This formula works great except for the dates for Sept-
Dec. Such as 12161995 this formula gives me the date of
1/21/1995. What is the RIGHT number instead of 4?

Thank you!
 
P

Peo Sjoblom

Try this amendment

=DATE(RIGHT(A1,4),LEFT(A1,IF(LEN(A1)=7,1,2)),MID(A1,IF(LEN(A1)=7,2,3),2))
 
R

Ron Rosenfeld

I received this formula for changing regular unformatted
dates to a date field. =DATA(RIGHT(A1,4),LEFT(A1,1),MID
(A1,2,2)

This formula works great except for the dates for Sept-
Dec. Such as 12161995 this formula gives me the date of
1/21/1995. What is the RIGHT number instead of 4?

Thank you!


Try this formula instead:

=DATE(MOD(A1,10^4),INT(A1/10^6),MOD(INT(A1/10^4),10^2))


--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