View Single Post
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

birkato,

=TRIM(A1)*1

will force the string that TRIM returns into a date (a number, actually). Simply format the cell
with the formula as a date.

HTH,
Bernie
MS Excel MVP


"birkato" wrote in message
...

I often have to import CSV files into excel and the files contain dates
such as

1/2/05 12:22:12 PM

The problem is that when I import them, there is a space before the
date so it is not taking as a date unless I remove the space. I tried
to use the "TRIM" command and it does take the space off, but it still
won't recognize those values as dates for some reason. If I use the
trim function and then copy the values only into another cell it still
won't act as a date until I go in to edit the cell and then click out
of it.

Has anyone ever run into this and do you have any suggestions?


--
birkato
------------------------------------------------------------------------
birkato's Profile: http://www.excelforum.com/member.php...o&userid=21011
View this thread: http://www.excelforum.com/showthread...hreadid=388751