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.

1 Answer 1

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.

2
  • 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. Commented Mar 5, 2019 at 19:20
  • What do you mean that =TEXT(MyDateField,"YYYYMMdd") doesn't work? Please share more information about it. Commented Mar 7, 2019 at 7:19

Your Answer

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

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