Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to concatenate string with DATE()? [duplicate]

Tags:

excel

In Excel, I'm trying to have a cell look something like:

by no later than August 27, 2012

When I try to concatenate a string with a DATE, for example:

="by no later than " & DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))

I get an output like this:

by no later than 41118

How can I get a date to show up instead of an integer?

like image 915
Louis Waweru Avatar asked Jul 28 '12 05:07

Louis Waweru


People also ask

How do I concatenate a date in a string?

Select a blank cell you will output the concatenation result, and enter the formula =CONCATENATE(TEXT(A2, "yyyy-mm-dd")," ", B2) ( A2 is the cell with date you will concatenate, and B2 is another cell you will concatenate) into it, and press the Enter key.

Does concatenate work with dates?

To Concatenate Dates in Excel, first, we need to convert the cells which contain Date into Text format using the TEXT function, and there we will choose the format of the date that we want to keep in text format. Insert CONCATENATE function in a cell and right after starting the TEXT function.

How do you concatenate 2 dates in Excel?

Combine data using the CONCAT function Select the cell where you want to put the combined data. Type =CONCAT(. Select the cell you want to combine first. Use commas to separate the cells you are combining and use quotation marks to add spaces, commas, or other text.


2 Answers

DATE builds a date timestamp. You need to convert that to a string. See this question for how to do so:

  • Excel Date to String conversion

It would look something like this:

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())), "DD/MM/YYYY hh:mm:ss")
like image 144
Jonathon Reinhart Avatar answered Sep 21 '22 20:09

Jonathon Reinhart


You don't really need DATE function at all for today's date, you could use just

="by no later than "&TEXT(TODAY(),"mmmm d, yyyy")

like image 25
barry houdini Avatar answered Sep 19 '22 20:09

barry houdini