Excel merge cell date and time

2020-08-16 08:12发布

I want merge cell in Excel 2013 column date (2016-01-01) and column time (16:00:00),

How do I format cells to get 2016-01-01 16:00:00 ?

Here is my example https://postimg.org/image/clxeqb66h/

I get 42677 16:00:00

3条回答
唯我独甜
2楼-- · 2020-08-16 08:26

You can achieve this by using TEXT function.

As long as the date is on the A1 cell..

=TEXT(A1,"YYYY-MM-DD") 

=TEXT(A1,"HH:MM:SS")
查看更多
你好瞎i
3楼-- · 2020-08-16 08:29
  • ADD the two values

    • Dates and Times are stored in Excel as numbers of days since 1 Jan 1900 and fractions of a day for the time. So to combine a date and time you would add them

    • Format the result as yyyy-mm-dd hh:mm:ss

enter image description here

查看更多
欢心
4楼-- · 2020-08-16 08:35

There is a very simple formula that can quickly help you combine date column and time column into one.

Type this formula = TEXT(A2,"m/dd/yy ")&TEXT(B2,"hh:mm:ss")

A2 indicates the first data in date column, 
B2 stands the first data in time column, 
you can change them as you need) into a blank cell, 
and press Enter key, 
then drag the fill handle to fill the range you want to use this formula. 
See screenshot:

enter image description here

More :https://www.extendoffice.com/documents/excel/1538-excel-combine-date-and-time.html

查看更多
登录 后发表回答