You are viewing limited content. For full access, please sign in.

Question

Question

How to format using TEXT(123456,"????")

asked on March 2, 2021

I'm looking to convert a date into yyyyMMdd format. I just want an 8 digit year month and day format.

This works to convert the current date: 

=CONCATENATE(TEXT(Year(now())), right(CONCATENATE(0,TEXT(Month(now()))),2), right(CONCATENATE(0,TEXT(Day(now()))),2))

I tried to figure out how to use the TEXT() to format the the Month and Day into 2 strings with the leading zeros. I tried things like: TEXT(Month(now()), "0d")  or TEXT(Month(now()), "D2") or TEXT(Month(now()), "dd") ,....

But I could never get the format to give me a two digit month. The only time I could get it to work was when I had not formatting.

Does anyone know how to use the format part of the TEXT(number, format) formula?

1 0

Replies

replied on March 3, 2021

TEXT function in Forms doesn't support format code, you need to use the CONCATENATE workaround.

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.