Reverse Engineering of a Date to a Number

J

JStone0218

I need help reverse engineering the following:

By using the formula below, I'm able to take the number 1031023 and convert it
to 10-23-03.

=CONCATENATE(MID(A2,4,2),"/",MID(A2,6,2),"/",MID(A2,2,2))

What I need is a way to take the date 10-23-03 and convert it to 1031023.

Thanks in advance for the help.
 
N

Niek Otten

=1000000+(YEAR(A2)-2000)*10000+MONTH(A2)*100+DAY(A2)

--
Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
R

Rekoj

The formula you would use would be very similar to the one you have listed

I would use the following

=left(A2,2)&mid(A2,4,2)&right(A2,2

If you want to use Concatenate, it would be
=concatenate(left(A2,2),mid(A2,4,2),right(A2,2)

Rekoj
 

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