Best way to format data of child template date/time field?

I need to display a child’s lastmodifieddate. I know a couple ways to accomplish this, like creating a saleforce calc field, but before I go to that trouble, I was wondering if anyone knew a quick way to format it as mm/dd/yyyy.

This might help:

any update?

I think a salesforce formula field is probably your easiest most proven option.

it’s sad to hear that.
I saw some posts that we can put a snippet which can be invoked by clicking.
I believe if we can trigger the snippet on load. this formatting problem should be solved without a formula field supporting.

There are lots of things you can do with UI-only formula fields that may be relevant. I’ve been trying to make use of the MODEL_LOOKUP function on an Account model that grabs data from a separate Contact model. In my case, the formula looks like this: MODEL_LOOKUP(“Con”,“LastModifiedDate”,“AccountId”,{{Id}}). The UI-only field is set up to output as Datetime, but could also be set up as date; either way, this looks to format the UTC code in the more friendly date or date/time format. (Read more here:

If you’re specifically talking about a child relationship loaded into a parent model (like, for example an Account model with a child relationship on Contacts), this may not get you 100% of the way there. Still, I wanted to share the ideas.

Depending on your specific needs, it might be worth setting up a separate model on the child object and pulling in the relevant fields you’re wanting. You could then refer to the model and its fields just about anywhere, using merge syntax.

Hi, thanks for your guide.
One quick question. 
In my special case, is there any way to pass the children’s field value into the snippet.
I tried three kinds of invocations. None of them works.


Hi Poc, my recommendation would be to preview your page, open the console, and use the command to view the raw data in your models. You can then click around and follow the hierarchy to drill down to the model and field relationships you’re after. That should give you an idea of how you might refer to them with merge syntax. 

Hi Mark, thanks for giving me this helpful debugging skill.
However, what I need is the current field value of the current table row.
Any idea to fetch the current field value inside the template field?

Can you do something like this? (changing the Owner.CreatedDate to relevant field)

var field = arguments[0],
$ = skuid.$;

var value = new Date(field.row.Owner.CreatedDate);
value = value.toLocaleDateString(“en-US”)