View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Christian[_5_] Christian[_5_] is offline
external usenet poster
 
Posts: 6
Default Strip date from string and transfer datetext to number

Hi,

Thanks for the proposal. This still gives me problems with dates in October.
In danish the short name is Okt and in english it's Oct.

The other solution provided by KeepItCool works fine.


"MSP77079 " wrote in message
...
Yes, you are making this more difficult than necessary.

Try using the VBA commands:
myDate = Datevalue(Left("04Oct20040000", 9))
myDate = Format(myDate, "d-mmm-yyyy")

You can combine the two into one statement if you like. I have
separated them here for clarity.

Good luck.


---
Message posted from http://www.ExcelForum.com/