Date Field Format
- This topic has 2 replies, 3 voices, and was last updated 6 years, 4 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › Date Field Format
I have a rule that on change of a date field {ReleaseDate} I set the field value of the {Title} to include the date. By default it is formatted as 6/25/2020 but I’d like it to be June 25, 2020. I tried {ReleaseDate[dddd MMMM dd, yyyy]} but that doesn’t seem to work. Is this possible out of the box?
try this
{ReleaseDate['MMMM dd, yyyy']}
Hi,
Sorry, but the Set field value in the rules don’t support that. You must call a custom function like this from the rule:
function setFormattedDate(){
var dateObj = spjs.utility.getDateFieldAsDateObject("DateColumn1");
setFieldValue("Title",spjs.dffs.formatDate(dateObj,"dd MMMM yyyy"));
}
Change DateColumn1 to match your date field name.
Alexander