The time they expect.
Written as text.
Salesforce stores a Date/Time in UTC. Sometimes getting it to display correctly in flows or external sites is tricky. This invocable Apex gives you a text output in the format and time zone that works for you.
Same instant, the text you asked for
Stored as 2026-09-27 17:00 UTC
Time zone America/Los_Angeles
- yyyy-MM-dd HH:mm:ss
- 2026-09-27 10:00:00
- M/d/yyyy h:mm a
- 9/27/2026 10:00 AM
- EEEE, MMMM d 'at' h:mm a
- Sunday, September 27 at 10:00 AM
- Review
- One Date/Time in. Text out, in the pattern and time zone you set.
- Install
- Production and sandbox links above. Unlocked package. It runs from the Flow that already has the Date/Time.
- Get help
- Setup notes are in the support docs. Source is on GitHub.
A formula cannot name the time zone.
Salesforce stores a Date/Time in UTC and shows the viewing user’s time zone only on screen. Inside a formula you still have the UTC instant. There is no native function that converts that instant to a named time zone such as America/Los_Angeles.
Two IdeaExchange requests are still open: standard date, DateTime, and time formatting options and a GMT offset formula function to convert times for the current user. While we wait for these Ideas to be delivered, you can use this.
Examples of where this can be useful
Use it when the message, the screen, or the file should show a local clock time, and the field you have is a Date/Time.
Confirmation email
The body says the local time, not the UTC value stored on the record (UTC).
Screen text
A Flow screen shows the appointment in the zone the participant expects.
File names and notes
A stamp in a file name or a task comment uses the local time, in the pattern you set.
The text comes out in the pattern you set.
In Flow, add Format Date Time in Time Zone Offset. Set the Date/Time, the time zone, and a pattern. The action returns Formatted Date Time. Leave the pattern blank and you get yyyy-MM-dd HH:mm:ss. Set M/d/yyyy h:mm a when the message should read 9/27/2026 10:00 AM.
The default
yyyy-MM-dd HH:mm:ss writes 2026-09-27 10:00:00. Use this when the text is a stamp, a file name, or a value another step can sort.
A clock time
M/d/yyyy h:mm a writes 9/27/2026 10:00 AM. Use this in an email or on a screen.
Words, when you need them
EEEE, MMMM d 'at' h:mm a writes Sunday, September 27 at 10:00 AM. Month names and AM/PM follow the running user’s language.
The time zone can be a name, such as America/Los_Angeles, which follows daylight saving, or a fixed offset, such as -07:00, which stays the same all year.
Free unlocked package. After install, the action is three_levers.FormatDateTimeOffset.
Setup notes are in the support docs. Source is on GitHub.
A blank Date/Time returns blank text and does not stop the Flow. A blank or unrecognized time zone does. Put a fault path on the action when the zone comes from a field someone typed.
Want the local time written out?
Install it yourself, or reach out for help getting it set up.