View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Joe M. Joe M. is offline
external usenet poster
 
Posts: 97
Default Convert Date string to date format

All my date strings have 2 charactors for the month so "7" would be 200907...

"Gary''s Student" wrote:

You are correct!
MID(A4,5,2) is just as good.

RIGHT(A4,2)
not so good......consider 20097
--
Gary''s Student - gsnu201002


"Joe M." wrote:

It works great! But I don't understand why its necessary to use 256 in
MID(A4,5,256) instead of MID(A4,5,2) or even RIGHT(A4,2). Maybe you can shed
some light on that. Thanks!

"Gary''s Student" wrote:

=DATE(LEFT(A4,4),MID(A4,5,256),1)
and format as mmm-yyyy
--
Gary''s Student - gsnu201002