function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
zepzzepz 

Display UTC Time to all users - Any Ideas?

How to Display UTC Time to all users?

 

 

Scenario:

I have a field called Case.Alert_TimeStamp__c

I store the UTC datetime incident occurence using API call from .NET code in this field.

The field displays the timestamp to each user in their local time based on their timezone setting.

All fine so far...

 

My users want to see the original UTC timestamp on the UI.

The workaround I am using right now is with Apex trigger and formatgmt function to store datetime value in a text field.

 

This takes away the ability to do proper sorting or queries based on time range.

 

I am looking for a solution to store UTC datetime as datetime data type and display the exact same value to all my users. (they are in different timezones)

 

 

I am really hoping to know that there is a simple solution to this... :)

 

Thanks in advance for any help with this!

 

Sunil NandipatiSunil Nandipati

DateTime is already stored as UTC ... all you have to do is create a formula of type text.

 

Text(field_api_name_which_is_storing_datetime)

 

zepzzepz

Hi Sunil

Thanks for your response. I am already converting it to text and displaying currently as a workaround.

However I lose the ability to use that field in listviews as a criteria and for automatic locale conversion. mm/dd to dd/mm while using text.

 

My conclusion from other offline discussions on this topic is that this cannot be currently achieved in Salesforce.com.