Creating Dynamic Clock Emojis to Tell Time

Sometimes, you just want the system to feel a little more alive.

We spend so much time staring at record pages, grids, and compact layouts that they can start to feel static. I wanted to add a small UI touch that would reflect the real world—specifically, a clock emoji that actually updates to match the current time.

It started as a fun experiment to see if I could get a Formula Field to output the correct clock face (🕐 vs 🕠) rounded to the nearest 30 minutes. It turns out, you can, but it requires a little bit of math to handle the rounding and the timezone offsets.

Here is how I built it.

The Logic

Instead of writing a massive IF/ELSE statement for every single time slot, I used a math-based approach.

  1. Convert time to an index: I treat the 12-hour clock as 24 distinct “slots” (12 hours x 2 half-hour increments).
  2. Round the minutes: We add a “buffer” of 15 minutes before dividing by 30. This ensures that 1:14 rounds down to 1:00, but 1:15 rounds up to 1:30.
  3. Map the index: A simple CASE statement swaps the calculated number (0-23) for the correct emoji.

The Formula (Eastern Time)

The tricky part is that Salesforce formulas calculate in UTC (GMT). If you are in Eastern Time (like me), TIMENOW() will be 4 or 5 hours ahead of you.

To fix this, we have to subtract the milliseconds equivalent of 5 hours (18000000) from the current time.

Here is the code you can paste into a Text Formula field:

A Note on Daylight Savings

Because Salesforce formulas don’t automatically handle Daylight Saving Time (DST) inside the TIMENOW() function, this formula relies on a hardcoded offset.

  • Standard Time (Winter): Use 18000000 (5 hours)
  • Daylight Time (Summer): Use 14400000 (4 hours)

Twice a year, when you change your microwave clock, just pop into the Object Manager and swap that number. It’s a small price to pay for a system that smiles back at you!

Why do this?

Functionally, does this change how we close deals? Probably not. But user experience is about more than just clicking buttons. Small pieces of Micro UX like this make the org feel personalized and polished.

Give it a try and let me know what you think!