Using moment handlebar helper in KX Dashboards Template

I’m looking to apply a date format to a view state using the moment handlebar, but it’s unclear how to format this

{{moment ([$viewstatename$])}}

But it looks like the moment also needs .format information for how the time is to be displayed, but this throws an error in the Dashboard Template editor.

How is moment used as a handlebar helper in Dashboards?

try one of these in your template (also try changing viewstate type to timestamp):

{{ moment [$viewstatename$] 'YYYY-MM-DD HH:mm:ss.SSS'}}


{{ UTCtoTimeZone [$viewstatename$] 'YYYY-MM-DD HH:mm:ss.SSS' }}