View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Date / Time problem

With a value in A1:
=DATE(MID(A1,7,4),LEFT(A1,2),MID(A1,4,2))+MID(A1,F IND(" ",A1,1)+1,256)
and format the cell as:
Custom mmmm dd yyyy hh:mm
this will display:
September 05 2008 08:00

--
Gary''s Student - gsnu200802


"mc" wrote:

I am trying to format some cells with date/time stamps. The data is coming
in as follows:

09-05-2008 8:00
09-04-2008 1:00
09-03-2008 20:30

The dates should be Sep 5 2008, Sep 4 2008, Sep 3 2008 etc...but when I use
the date format in Excel (mmm dd yyyy), they are coming back as May 09 2008,
Apr 09 2008, Mar 09 2008, which is totally incorrect. Even if I use dd mmm
yyyy, it still formats it incorrectly, 09 May 2008, 09 Apr 2008, 09 Mar 2008.

I know how to extract the month/day/year and then convert it to the proper
date format but my problem is I need the time stamp from these cells added
back to my proper date(s). This is what I want:

Sep 05 2008 8:00
Sep 04 2008 1:00
Sep 03 2008 20:30

Any help would be appreciated.