action framework format date

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Hi,

With the action framework I'm trying to update a text field with one of the date fields of the objects.

The text message is something like:
Our provider has provided us an expected delivery date: {{Expected_Delivery_Date__c}}
the field is updated but with YYYY-mm-dd date format.

Can I change the format of the date in the 'Update field of a model' action?
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Hi Pablo,

A couple of options come to mind:

1. Use a Salesforce formula field
2. Use a Skuid custom field renderer
3. Use a Skuid Snippet with a Template component

Community can probably think of others?

Hope this helps.

Regards,
Irvin
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Irvin is on the right track.  Either make a formula field that reworks the date into component pieces and rearranges them as you want. 
or use some quick javascript to put together the information that needs to go into the display.  This will probably most easily be created using our "Custom component" 

Here are a few resources for the coding: 

Adjusting Date Format in custom field renderer. 

Using custom component to show text plus some calculated data.  (Start with step 6 of this tutorial)

You should be able to do this pretty quickly.  
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
It's what I was thinking but I was hoping to do this without coding... the problem is not show the data, this fields is used in conga to compose an email.

Thanks for the comments.
(Edited)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Sorry. Code Required.  We try to cover most scenarios with our declarative tools.  But there are times that you just need to go over to the dark side.... (Where the cookies are better) 

Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
I'm not afraid of the dark side (love the cookies) it's just if I can do it with 2 clicks and something like the template conditions {{#formatdate:dd-mm-yyyy}}{{date__c}}{{/formatdate}} why not? xD