DATEVALUE formula is not handling user's timezone correctly in list views, reports and related lists
Last updated 2020-10-16 ·Reference W-2375107 ·Reported By 3 users
The DATEVALUE formula incorrectly calculates the user time zone in list views, reports and related lists
1- Change your personal timezone to GMT in salesforce
2- Create a DateTime field in Accounts and add this value to it via the API (Workbench/Data Loader) 2014-08-11T18:46:22.000Z
3- Create a DATEVALUE formula that wraps the DateTime field
4- Create a list view that shows the account
You will see that the DateTime field value is 11/08/2014 6:46 PM and 11/08/2014 in the formula field in BOTH the record detail page and the list view.
5- Change your personal timezone to GMT+5:30
6- Now the DateTime field value is changed to 12/08/2014 12:16 AM
7- Compare the value of the formula field in the record detail page and the list view. You will notice the list view shows the original GMT time 11/08/2014 instead of 12/08/2014
Go to Setup, in the Quick Find box, enter Company Information. Under Local Settings, select Improve DATEVALUE() accuracy for DST. If your org’s custom formulas include workarounds that adjust date values between 11:00 PM and 1:00 AM, remove them before enabling this setting. If you don’t remove the workarounds, your data could be inaccurate. Enabling the preference can also increase the compiled size of existing formulas with the DATEVALUE() function.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.