View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default How to convert text into date format?

There's nothing wrong with your formula that I can see. If the quotes are
appearing in the result cell then I'd check the formatting of that cell to
ensure that they aren't being put back by a format that's been set up.

"Eric" wrote:

In cell a1, it contains text "2024--01-2007", and I would like to convert
into 24-01-2007 for date format. Through this command,
RIGHT(SUBSTITUTE("2024--01-2007","--","-"),10) is successfully converted to
"24-01-2007", but this text cannot be recognized as a date format. Does
anyone have any suggestion on how to convert this text into date format?
Thank for any suggestion
Eric