my date field is showing one day earlier than the attribute table in my popup. How do i fix this?

2787
8
Jump to solution
09-30-2014 08:01 AM
BradGeorgic
New Contributor III

My flex viewer is showing the date field as one day earlier.  How do I fix it?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Brad,

  Manually edit your PopUp_47.xml file to look like this (I have tested and I get dates one day earlier than your app is showing):

<?xml version="1.0" ?>

<configuration>

    <title>Volunteer Opportunities</title>

    <fields>

        <field name="Date" alias="Date" visible="true">

            <format useutc="true" dateformat="MMMM D, YYYY"/>

        </field>

        <field name="PublicViewable" alias="PublicViewable"/>

        <field name="Department" alias="Department" visible="true"/>

        <field name="Contact" alias="Contact" visible="true"/>

        <field name="Description" alias="Description" visible="true"/>

        <field name="X" alias="X">

            <format precision="5" />

        </field>

        <field name="Y" alias="Y">

            <format precision="5" />

        </field>

    </fields>

    <showattachments>true</showattachments>

    <showrelatedrecords>false</showrelatedrecords>

</configuration>

To find this file look in your c:\inetpub\wwwroot\flexviewers\map\popups\PopUp_47.xml (the map part of the path is the only part I am not sure about, map would be the name you gave the application when you created it in AppBuilder).

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Brad,

   So is it the popup or the attribute table that is wrong? Are you using the useutc attribute?

Popups useutc: ArcGIS Viewer for Flex - Pop-up configuration files

Attribute Table Widget useutc: ArcGIS Viewer for Flex - Attribute Table widgettags

0 Kudos
BradGeorgic
New Contributor III

the popup is showing the wrong date.  The attribute table is correct.  I tried it both ways UTC and non-utc

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brad,

  please provide your pop up config.

0 Kudos
BradGeorgic
New Contributor III

I am using the Flex- Application Builder.  How doe I get the popup info?

Map of Our Work

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brad,

   Which layer is showing the wrong date? Which service and sublayer ID number?

0 Kudos
BradGeorgic
New Contributor III

Layer: WPC Volunteer Opportunities (ID: 0)

it is the date field in that service.  Thanks for the help

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brad,

  Manually edit your PopUp_47.xml file to look like this (I have tested and I get dates one day earlier than your app is showing):

<?xml version="1.0" ?>

<configuration>

    <title>Volunteer Opportunities</title>

    <fields>

        <field name="Date" alias="Date" visible="true">

            <format useutc="true" dateformat="MMMM D, YYYY"/>

        </field>

        <field name="PublicViewable" alias="PublicViewable"/>

        <field name="Department" alias="Department" visible="true"/>

        <field name="Contact" alias="Contact" visible="true"/>

        <field name="Description" alias="Description" visible="true"/>

        <field name="X" alias="X">

            <format precision="5" />

        </field>

        <field name="Y" alias="Y">

            <format precision="5" />

        </field>

    </fields>

    <showattachments>true</showattachments>

    <showrelatedrecords>false</showrelatedrecords>

</configuration>

To find this file look in your c:\inetpub\wwwroot\flexviewers\map\popups\PopUp_47.xml (the map part of the path is the only part I am not sure about, map would be the name you gave the application when you created it in AppBuilder).

0 Kudos
BradGeorgic
New Contributor III

Thanks.  I'm not sure why initially the use UTC didn't work in App Builder.  THANK YOU for the debug!

0 Kudos