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
Daniel BleasdaleDaniel Bleasdale 

When using dates on a process the date value is always off by -1

As the title says "When using dates on a process the date value is always off by -1"
Same happens when a date is imported.
Is it something to do with time zones. I'm using GMT zone.
Why is this, and how do I fix it?

Thanks Dan
Best Answer chosen by Daniel Bleasdale
Raj VakatiRaj Vakati
try this
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_convert_time_zone.htm
SELECT convertTimezone(CreatedDate)
FROM Opportunity

 

All Answers

Raj VakatiRaj Vakati
use TimeZone function in SOQL
Daniel BleasdaleDaniel Bleasdale
Cheers, how do I do that?
Raj VakatiRaj Vakati
try this
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_convert_time_zone.htm
SELECT convertTimezone(CreatedDate)
FROM Opportunity

 
This was selected as the best answer