#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 132
Default Date Formating

Hi

I merge 2 date and time cells with the formula = A5 &"" & B5 where A5 is
9/12/2007 and B5 is 16:00. The result I get is 393370.666666666666667. I
tried to format as mm/dd/yyyy hh:mm or any other date and time format none
worked.

Does anyone know how can I get the format I want.

Thanks in advance for your help.

Orquidea



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Date Formating

If you want text:
=text(a5,"mm/dd/yyyy") & " " & text(b5,"hh:mm:ss")

if you really want a number:
=a5+b5
and give it a custom format of:
mm/dd/yyyy hh:mm:ss

(or the format you like)

The problem is that 9/12/2007 is 39337 days past a starting date (Dec 31, 1899)

And b5 is 0.6666666667 (time is just a fraction of a day = 16/24)

When you used this to concatenate the strings:
= A5 &"" & B5
You ended up with the leading 0 for the hours appended to the whole number
portion.



orquidea wrote:

Hi

I merge 2 date and time cells with the formula = A5 &"" & B5 where A5 is
9/12/2007 and B5 is 16:00. The result I get is 393370.666666666666667. I
tried to format as mm/dd/yyyy hh:mm or any other date and time format none
worked.

Does anyone know how can I get the format I want.

Thanks in advance for your help.

Orquidea


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 132
Default Date Formating

Thanks David. I took the second option. It has been so simple.

Orquidea

"orquidea" wrote:

Hi

I merge 2 date and time cells with the formula = A5 &"" & B5 where A5 is
9/12/2007 and B5 is 16:00. The result I get is 393370.666666666666667. I
tried to format as mm/dd/yyyy hh:mm or any other date and time format none
worked.

Does anyone know how can I get the format I want.

Thanks in advance for your help.

Orquidea



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Formating Mel Excel Worksheet Functions 5 February 22nd 07 04:13 PM
Date formating Hawksby Excel Discussion (Misc queries) 2 December 14th 06 06:33 PM
Date formating chad Excel Worksheet Functions 3 October 21st 06 03:31 PM
formating a date field Stephen Excel Discussion (Misc queries) 3 January 25th 06 08:33 PM
Conditional formating w/ Date Steven Stadelhofer Excel Worksheet Functions 1 February 3rd 05 05:29 PM


All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"