# UTC using a formula

Can anyone lend a hand? I have fields that are based on local time, e.g. 9 AM in Riga, Latvia, and I need to reflect the time in UTC for the reports. So when I pull the report, it should be 7AM.

If I use DATETIMEVALUE, it's pulling in the same value, not UTC.

Would this formula work, and if so, how do I adapt it for UTC from PST? Having a total blank for what I need to do.

``````    IF ( DATEVALUE(Departure_Date_And_Time__c) >=
DATE ( YEAR (DATEVALUE(Departure_Date_And_Time__c)),3,1)
+
(
14-
CASE( MOD(DATE ( YEAR (DATEVALUE(Departure_Date_And_Time__c)),3,1) - DATE (1900,1,7),7) ,
0,7,MOD(DATE ( YEAR (DATEVALUE(Departure_Date_And_Time__c)),3,1) - DATE (1900,1,7),7))
)
&&
DATEVALUE(Departure_Date_And_Time__c) <
DATE ( YEAR (DATEVALUE(Departure_Date_And_Time__c)),11,1)
+
(
7-
CASE( MOD(DATE ( YEAR (DATEVALUE(Departure_Date_And_Time__c)),11,1) - DATE (1900,1,7),7) ,
0,7,MOD(DATE ( YEAR (DATEVALUE(Departure_Date_And_Time__c)),11,1) - DATE (1900,1,7),7))
),
LEFT ( TEXT (Departure_Date_And_Time__c- 7/24 ), 16),
LEFT ( TEXT (Departure_Date_And_Time__c- 8/24), 16)
)
``````

If you wrap a Date/Time field in the `TEXT()` formula function, it returns the GMT value instead of converting it first. (See Converting Between Date/Time and Text in the Using Date and Date/Time in Formulas documentation.) So `TEXT(Departure_Date_And_Time__c)` should return your value in GMT -- not exactly UTC, but it might work for your purposes -- and then you can use text manipulation to reformat it.