8,849
edits
Changes
→Using sscalculation to Change Date Formats of Data in Custom Fields
<pre><!--@sscalculation(date_format("@parent.fieldname@","%M %d, %Y"))--></pre>
* Use the following arguments to format the date/time information
:{| border="1" cellpadding="5"
|-
|%M %d, %Y||will return date in format of ''September 30, 2012''
|-
|%a||will return the truncated day of the week, e.g. ''Sun.'' for Sunday
|-
|%b||will return the truncated name of the month, e.g. ''Sep'' for September
|-
|%c||will return the month number in short format, e.g. ''9'' for September
|-
|%h||will return hour, e.g. ''12''
|-
|%i||will return minutes, e.g. ''00'
|-
|%m||will return the month number, e.g. ''09'' for September
|-
|%p||will return AM/PM information, e.g. ''AM''
|-
|%r||will return the full time format, e.g. ''12:00:00 AM''
|-
|%y||will return the truncated year, e.g. ''12'' for 2012
|-
|%D||will return the month ordinal, e.g. ''30th''
|-
|%W||will return the day of the week, e.g. ''Sunday''
|}
* This is not necessary if the custom field being referenced is on the same level as the field referencing it. For example, if you are referencing a level 2 custom field in a web page view field on level 2. In this case, you can use the syntax outlined on the [[Web_Page_View_Field_Variables#Custom_Fields_Date.2FTime|Web Page View Field Variables]] page.
[[Category:Variables]]