Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 363
Default Date/Time concatenation

Hello,

Cell A1 = YR (YYYY)
A2= Month (M) 1-12 no leading zero
A3= Day (D) 1-31 no leading zero
A4= Hour (H) 1-24 no leading zero

How do I create a date/time (dd/mm/yyyy HH:MM) from these columns
I know Date(a1,a2,a3) will gice me the date but how do I add the time as well?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Date/Time concatenation

=DATE(A1,A2,A3)+TIME(A4,0,0) and format to include BOTH date & time.
--
Gary''s Student - gsnu200839


"Al" wrote:

Hello,

Cell A1 = YR (YYYY)
A2= Month (M) 1-12 no leading zero
A3= Day (D) 1-31 no leading zero
A4= Hour (H) 1-24 no leading zero

How do I create a date/time (dd/mm/yyyy HH:MM) from these columns
I know Date(a1,a2,a3) will gice me the date but how do I add the time as well?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Date/Time concatenation

Hi,

You don't say where the minutes come from for the time so this assumes 00
minutes

=TEXT(DATE(A1,A2,A3),"dd/mm/yyyy ")&TEXT(TIME(A4,0,0),"hh:mm")

Mike

"Al" wrote:

Hello,

Cell A1 = YR (YYYY)
A2= Month (M) 1-12 no leading zero
A3= Day (D) 1-31 no leading zero
A4= Hour (H) 1-24 no leading zero

How do I create a date/time (dd/mm/yyyy HH:MM) from these columns
I know Date(a1,a2,a3) will gice me the date but how do I add the time as well?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 363
Default Date/Time concatenation

Thanks!


"Gary''s Student" wrote:

=DATE(A1,A2,A3)+TIME(A4,0,0) and format to include BOTH date & time.
--
Gary''s Student - gsnu200839


"Al" wrote:

Hello,

Cell A1 = YR (YYYY)
A2= Month (M) 1-12 no leading zero
A3= Day (D) 1-31 no leading zero
A4= Hour (H) 1-24 no leading zero

How do I create a date/time (dd/mm/yyyy HH:MM) from these columns
I know Date(a1,a2,a3) will gice me the date but how do I add the time as well?

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default Date/Time concatenation

Hi,

Here is another solution:

=(A2&"-"&A3&"-"&A1)+A4/24

or using this idea:

=DATE(A1,A2,A3)+A4/24

Although longer the first one has the advantage that you can enter the year
as 1 or 2 digits in A1. The second one returns 1909 if you enter 9.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Al" wrote:

Hello,

Cell A1 = YR (YYYY)
A2= Month (M) 1-12 no leading zero
A3= Day (D) 1-31 no leading zero
A4= Hour (H) 1-24 no leading zero

How do I create a date/time (dd/mm/yyyy HH:MM) from these columns
I know Date(a1,a2,a3) will gice me the date but how do I add the time as well?

Thanks

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 in Concatenation FARAZ QURESHI Excel Discussion (Misc queries) 2 September 20th 07 04:55 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM
date and text concatenation littleps New Users to Excel 8 July 28th 05 11:23 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 02:48 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM


All times are GMT +1. The time now is 09:56 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"