popomomo
popomomo

Reputation: 81

Google Sheet - Concatenate text with date format

How with Google Sheet I can concatenate text and date ?

This is what I have tried:

=CONCATENATE("Date : "; TEXT(C9, "YYYY-MM-DD"); ". Thanks.")

Output should be:

Date : 2023-01-03. Thanks.

Thanks.

Upvotes: 2

Views: 9764

Answers (1)

doubleunary
doubleunary

Reputation: 19249

Some operators, such as the concatenation operator &, get the pure numeric value instead of the formatted value. Dates are numbers, and their pure numeric values are dateserials that look like 45630 for 4 December 2024.

You can get the value in cell C9 in the format it shows in the spreadsheet with the to_text() function, like this:

="Date: " & to_text(C9) & ". Thanks."

Alternatively, use join(), like this:

=join(""; "Date: "; C9; ". Thanks.")

See Working with date and time values in Google Sheets and join().

Upvotes: 9

Related Questions