0

We have a requirement in which a custom date field is displayed in the format:

YearMonthDay

example:

20181031

How can I achieve this at the Site Column level? Does it require JSON Column formatting? I do NOT want to use a Calculated field.

0

It's impossible to apply custom string formats using column formatting currently. Please see custom formatter reference https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting

Operator supported for date fields are:

toLocaleString()
toLocaleDateString()
toLocaleTimeString()

So I think calculated column is your best option.

  • I specifically stated no Calculated columns. They still have the same issues they did years ago. You can't paste in data because they're read only. And why does this work =TEXT(Created,"YYYYMMdd") while this doesn't =TEXT(MyDateField,"YYYYMMdd")... makes no sense. – Colbs Mar 5 at 19:20
  • What do you mean that =TEXT(MyDateField,"YYYYMMdd") doesn't work? Please share more information about it. – Michael Han_MSFT Mar 7 at 7:19

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.