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()?


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
| improve this answer | |

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

| improve this answer | |

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.