I need to create the following value:

// "ABC" + current date + some random number

I do as follows:


But instead of getting expected value I get something weird in date segment:


How can I get pure date in concatenate()?

2 Answers 2


You need to convert the date value to a string of the form yyyymmdd. The text formula does this:

=text(today(), "yyyymmdd")

(It's better to use today() instead of now() when you want the date only.)

The entire formula would be

=concatenate("ABC", text(today(), "yyyymmdd"), 123)

or, more concisely,

="ABC" & text(today(), "yyyymmdd") & 123

You can eliminate the concatenate function altogether and join them using the & and transforming the data to a text format:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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