Skip to main content
Nintex Community Menu Bar
Question

UI Only Field DateTime Calculation

  • July 10, 2024
  • 7 replies
  • 56 views

Forum|alt.badge.img+6

So I’ve seen that UI only fields cannot do calculations on DateTime fields, just Dates using formulas like this post https://community.skuid.com/t/calculate-age-with-ui-only-field

Has anyone figured a relatively easy method/hack to do this aside from creating formula fields in Salesforce? We want to subtract 1 hour from a Salesforce DateTime field in the Skuid UI.

7 replies

Forum|alt.badge.img+18

ui formula fields can use datetime fields. They are just expressed in milliseconds.

So to subtract an hour, you want

{{Datetime__c}} - (1000*60*60)

Forum|alt.badge.img+6
  • Author
  • July 10, 2024

I had thought so too but tried that many times in past and doesn’t display. The calculation seemed to work off Date fields to subtract a day but not DateTime. Just tried it now and still get blank. The DateTime field is in the model.


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

This thread from a bit back seems to confirm. Actually even the dates may not work I might have been mistaken.

https://community.skuid.com/t/ui-only-formula-fields-add-1-month-to-date


Forum|alt.badge.img+18

What do you get if you change the displaytype of the formula field to Text?


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

Zip. Output blank so far for Text, Date, DateTime.

But after I saw JDs respons that said this isn’t supported I stopped playing with it esp since seems like would be straightforward if it did work. If I remove the calculation it does display as a DateTime.


Forum|alt.badge.img+18

That’s so strange. Well, you can do it with a javascript snippet.


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

Yeah, not super versed in those so try to avoid if can but don’t we now have to put those as static resources also? I’m only passively following the changes in Salesforce but thought that was one of the big things at least coming, even if I get away with it for today.