0

I know for a Tree Definition of DataElementFolder, there is a DateFormat attribute, but the DataElement node doesn't have such an attribute.

<DataElements Type="MA.PressRelease.Article" Label="${C1:Data:MA.PressRelease.Article:Date}" Display="Auto">

This will show up looking like this.

enter image description here

It would be nice to have something like "Month day, Year" (Ex: May 4, 2017)

NerdBrick
  • 165
  • 11

3 Answers3

1

https://github.com/Orckestra/C1-CMS-Foundation/issues, open a new issue, starting with the Title "Feature Request:" make a clear explanation about the benefits and anything else that you think that would improve and wait for response.

Alfred Severo
  • 496
  • 5
  • 15
0

No, as of the latest release the date format is hard-coded:

https://github.com/Orckestra/C1-CMS-Foundation/blob/dev/Composite/C1Console/Trees/DataFieldValueHelper.cs#L65

Dmitry Dzygin
  • 1,258
  • 13
  • 26
0

Per version 6.2 of C1 CMS you can control the label format for fields of type DateTime, decimal and int - thanks to your feature request.

Usage: Append a colon and then a format string to your label directive, for example:

<DataElements Type="MA.PressRelease.Article" Label="${C1:Data:MA.PressRelease.Article:Date:MMM d, yyyy}" Display="Auto">

The format string is the same you would use with .ToString() for the type of the field, ex "MMM d, yyyy" for dates, "F1" or "C" for decimals and ints.

mawtex
  • 436
  • 1
  • 4
  • 11