Show readable date in concatenate

opislak

Board Regular
Joined
Feb 28, 2017
Messages
68
Hi all,

How do you show a date in a readable format in a cell where two fields are concatenated.
Example:
- in cell A1 is a project name --> TestProject
- in cell B1 is a timestamped date --> 20-05-2021 15:35:01
- in cell C1 I want to concatenate both --> =A1&" ("&B1&")"
But the result is unreadable. It shows TestProject (44336,6493171296). I would like it to show me TestProject (20-05-2021 15:35:01)

Thanks for any help!!
Pat.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
39,339
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
You need to add the TEXT function - eg

Excel Formula:
=A1&" ("&TEXT(B1,"dd-mm-yyyy hh:mm:ss")&")"
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,701
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=A1&TEXT(B1,"(dd/mm/yyyy hh:mm:ss)")
 

opislak

Board Regular
Joined
Feb 28, 2017
Messages
68
Thanks both. That works. Except for the fact that I had to translate "yyyy" in "jjjj" and "hh" into "uu" (dutch). I don't understand, for my Excel is in English (I'm dutch speaking).
So I guess I will have a problem when someone with an Office in another language opens my file...
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,701
Office Version
  1. 365
Platform
  1. Windows
I suspect that you need jjjj & uu because of your windows settings, rather than xl, but as I've never used different language versions I'm not sure.
 

Forum statistics

Threads
1,176,042
Messages
5,901,092
Members
434,870
Latest member
michud08

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top