View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default MID formula not extracting what I want.

when you type in
1/13/2006 12:16:29 AM
excel automatically converts it to a number. In this case it is
38730.0114467593
This number represents the number of days from 12/31/1899 (1/1/1900 is
stored as 1).

Using MID(E1,1,9) takes the first nine digits of this number (remember this
number is the value of the cell).
to get the date portion and keep it as a date, you can take Roger's advice,
=INT(E1)
and format as a date. If you need a text output, you can use
=TEXT(E1,"m/dd/yyyy")

"wayliff" wrote:


I'm trying to extract the date from a cell using the MID formula and all
I'm getting is some weird number that does not seem to make sense.
I have tried formatting the target cell but still no change.

Any clues about it? How can I do this?


1/13/2006 12:16:29 AM

=MID(E5,1,9)

38730.011


--
wayliff
------------------------------------------------------------------------
wayliff's Profile: http://www.excelforum.com/member.php...o&userid=29860
View this thread: http://www.excelforum.com/showthread...hreadid=501062