0

Hopefully the title isn't too confusing, but basically I have two cells containing dates and I want to write a sentence in another cell using those dates. I know that to do this with things that aren't dates you just type in the cell:

="Today is, " & A2 & " Tomorrow is " & B2 & "!" Where A2 and B2 are strings or numbers.

But when I do the same thing with the dates, it gives me numbers instead of the actual dates (I believe this number is the number of days since 1899). Is there a way to format the dates as, well dates inside of the sentence? I tried DATEVALUE but it didn't work because the cells being referenced aren't strings. Maybe I could convert the referenced cells into strings inside of the function and then use DATEVALUE?

Thanks for the help!

1

If the cells A2 and B2 already have the dates in the format you need, you can just use this:

="Today is " & trim(A2) & ", and tomorrow is " & trim(B2)

See this answer for an explanation of how date and time values work in spreadsheets.

1

I figured it out! I can use TEXT().

Using the example from last time, I would use the following:

="Today is, " & TEXT(A2, "MM/DD/YYYY") & " Tomorrow is " & TEXT(B2, "MM/DD/YYYY") & "!"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.