View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MikeAllgood MikeAllgood is offline
external usenet poster
 
Posts: 6
Default Macro to convert mmddyyyy format into mm/dd/yyyy format

Have you tried using the Format command in a macro script? It would look
something like,

dMyDate=Format(dExistingDate, "mm/dd/yyyy").

Note that the dd will always return a two digit date. Single digit dates
will be preceeded by a "0".

Hope that helps.
Mike

"maijiuli" wrote:

Hello,

I'm trying to write a macro to do this function:

=DATE(RIGHT(e2,4),LEFT(e2,LEN(e2)-6),LEFT(RIGHT(e2,6),2))

I attempted to record the macro and then used an existing loop function off
another part of code to loop through all dates in column E but is not working
too well.

Thank you very much,


--
Thank You!