View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default format date time

One mo

=INT(--A1)

And format as a date.

The -- converts the text to numbers and the int() drops the fractional portion
(the time).

IT05 wrote:

5/12/2005 1:20:33 PM = text field
10/20/2004 10:02:40 AM = text field

I need to extract just the date and ignore the time.

Tried =MID(F2,1,9) and it worked for 5/12/2005 1:20:33 PM. Output showed
5/12/2005

Apparently this would not work for 10/20/2004 10:02:40 AM. Output would show
10/20/200.

Is there a work-around for this or a different formula that can be used?


--

Dave Peterson