Reverse Engineering of a Date to a Number

  • Thread starter Thread starter JStone0218
  • Start date Start date
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.
 
=1000000+(YEAR(A2)-2000)*10000+MONTH(A2)*100+DAY(A2)

--
Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
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
 
Back
Top