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 Format

Say A1 contains:

25.12.2008 09:30

In another cell enter:
=DATE(MID(A1,7,4),MID(A1,4,2),LEFT(A1,2))+TIME(MID (A1,12,2),RIGHT(A1,2),0)
and format:
Format Cells... . Number Custom dd/mm/yyyy hh:mm

This will display:
25/12/2008 09:30


--
Gary''s Student - gsnu200772


"Brampton76" wrote:

I export data that includes the date & time. The data is exported directly
into Excel with the date & time as follows: dd.mm.yyy hh:mm. This presents
no great problem because a simple find & replace on the column gives me
dd/mm/yyyy hh:mm which Excel recognises as a date and my formulas work OK. I
thought a Macro would save me some time, however, no amount of trying
prevents the Macro from formating the date mm/dd/yyyy hh:mm. I think I have
tried all the formatting options (including checking the system date and
time) and even tried including the formatting in the Macro and editing the
date in VBE. But............. it will insist on giving me the month, day and
year in that order. I thought it may be Excel 2000 (at work) but it also
happens in Excel 2003 (at home). Has anyone any thoughts please?
--
Glenn