ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combining date and time data (https://www.excelbanter.com/excel-worksheet-functions/194976-combining-date-time-data.html)

Nathan

Combining date and time data
 
Hi,

I have two columns. One has a date and the other has the time. I would like
to combine these two points in one cell [date time]. Can anyone tell me how?

Thanks,

Nathan

Gary''s Student

Combining date and time data
 
C1=A1+B1
--
Gary''s Student - gsnu200795


"Nathan" wrote:

Hi,

I have two columns. One has a date and the other has the time. I would like
to combine these two points in one cell [date time]. Can anyone tell me how?

Thanks,

Nathan


Rick Rothstein \(MVP - VB\)[_928_]

Combining date and time data
 
Just add the two cells together... =A1+A2 assuming the date is in A1 and the
time is in A2.

Rick


"Nathan" wrote in message
...
Hi,

I have two columns. One has a date and the other has the time. I would
like
to combine these two points in one cell [date time]. Can anyone tell me
how?

Thanks,

Nathan



ryguy7272

Combining date and time data
 
You can try a few things:
enter '=now()' into your cell and format as 'm/d/yyyy h:mm'

If you want to calculate a short difference in time, such a certain number
of days, try this:
=INT(A2-A1)&"d "&TEXT(MOD((A2-A1),1),"h:mm:ss")

If you want to calculate a short difference in time, such a certain number
of days, try this:
=DATEDIF(A1,A2,"y")&" years "&DATEDIF(A1,A2,"ym")&" months
"&DATEDIF(A1,A2,"md")&" days"

Regards,
Ryan---

--
RyGuy


"Nathan" wrote:

Hi,

I have two columns. One has a date and the other has the time. I would like
to combine these two points in one cell [date time]. Can anyone tell me how?

Thanks,

Nathan



All times are GMT +1. The time now is 06:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com