FORMAT_DATE adjusting for timezone when applied against DATE field

  • 2
  • Problem
  • Updated 3 years ago
  • Acknowledged
  • (Edited)
When applying FORMAT_DATE function to a DATE field, the resulting output is adjusting the DATE based on the timezone.

Note - This might be related to

Steps to Reproduce:
1) Add field "Test_Date__c" to Account object as a DATE field
2) Set SFDC timezone setting to make sure you are on a prior day from 00:00 GMT
2) Create page using XML below
3) Preview page

Expected Behavior
Test_Date__c == Formatted Date

Actual Behavior
Test_Date__c is correct
Formatted Date has adjusted for timezone (mine is PDT)

Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="FormattedDate" uionly="true" displaytype="FORMULA" label="Formatted Date" readonly="true" returntype="TEXT">
               <formula>FORMAT_DATE('mm/dd/yy', {{Test_Date__c}})</formula>
            <field id="Test_Date__c"/>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
      <pagetitle model="Account" uniqueid="sk-3QEmlF-70">
            <action type="savecancel" window="self"/>
      <basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="read" uniqueid="sk-3QEmlF-71">
            <column width="100%">
                  <section title="Basics">
                        <field id="Name"/>
                        <field id="Test_Date__c" valuehalign="" type=""/>
                        <field id="FormattedDate" valuehalign="" type=""/>
      <styleitem type="background" bgtype="none"/>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,376 Points 10k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,840 Points 5k badge 2x thumb

Thanks for alerting us of this bug. The devs are aware of it and will consider it for a future release.

Thanks for helping us make Skuid better!