Skip to main content

What formula is required in a UI Only field to turn a datetime into something that appears as HH:MM. 

For example, my datetime field is currently showing a full date/time e.g. “14/07/2016 09:07” but I want to see just “09:07”. The Hour and Minute function work to an extent, though I’m losing a 0 at the end, so “09:00” shows as “9:0”.

Ideally we’d append a text field “Subject” to the end:

{{StartDateTime}} {{Subject}}

What formula is needed to turn this into:

{{HH:MM}} {{Subject text here}}


Not sure, But i do not think you can accomplish this with UI-only formulas
But probably can do it with Javascript (not my forte)

But it is doable in Salesforce directly

Either using a Formula Field , but you may have issues with local timezones timezone: here

Or you can try using Apex: Here

Good luck


Thanks for comment Dave, I was really hoping Skuid could do some of this as UI fields are powerful and Skuid already seems to know how to stay in correct time zone etc. Took a look at links, will review doing in Salesforce as next solution - though idea of doing this direct is Skuid is appealing so keen to see if anyone has any good ideas first!


You Probably will be able using Javascript + UI-only field, wish i could help there, but i’m a JS noob

In case you are familiar with JS, here’s a good starting point: http://help.skuid.com/m/11720/l/129505-skuid-time

And here’s a post for a case where they wanted to add 1h to a date/time field, just for you to see syntax example…https://community.skuid.com/t/how-to-add-1-hour-to-a-datetime-feild-in-multiple-actions

Hope it helps


In my UI-Only field (formula, text), I found a function FORMAT_TIME:

FORMAT_TIME(“HH:mm”,{{StartDateTime}})

Looks to work fine, is returning “09:30” for an event with a start time of 9:30am.


Additional Info:
“H:mm” show just 1 or 2 digits as needed for the hours but is in military time. 
“H:mm a” shows 9:30 am or pm

But times are showing as military time.  14:30 pm.  Any good trickes to make it be 2:30 pm?


If you make the hour lower case, it puts it in the 12 hour format. So you’d do “hh:mm” if you want the leading zero for 02:30 or  “h:mm” for 2:30. Include the “a” if you want the am and pm.


Thank you!