I have a list of projects with planned start dates. I want to use the JSON field formatter, the documentation to which is here, in order to format the date as 'Year'-Q'quarter'.

I have a calcualted field that does this: =YEAR([Planned start date])&"-Q"&ROUNDUP(MONTH([Planned start date])/3,0) and it works perfectly.

Doing this does mean that you cannot quickedit the value and have it render as the new value. The documentation seems to suggest there are some options that can posisbly use a lookup on month to return it's quarter for example... but I just can't get my head round the notation needed to make the JSON work.

Can someone please help format dates this way.

  • Unfortunately, there is no equivalent to YEAR or MONTH in Column Formatting operators so that won't work for you. This would be pretty simple to write as an SPFx Field Customizer, however. – theChrisKent Dec 22 '17 at 1:48
  • Do you know if this is still the case @theChrisKent ? – Colbs Mar 4 at 22:14
  • Unfortunately, yes. However, calculated columns are now supported. So this value can be generated using a calculated column and the format applied there. Not as good as having this functionality in List Formatting, but it works – theChrisKent Mar 5 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.