Date Display Values
Hi, Having a problem getting the date values to display the way I would like.
I have a field set up in my geodatabase and when it was created in the geodatabase I choose 'Date'.
The values are entered in this format 'mm/dd/yyyy 00:00:00 am'
/customer/servlet/servlet.FileDownload?file=00P6000000elzi9EAA
In the SQL Server database this data is stored as the data type of 'datetime2 - which stores the data in the format I listed above MM/DD/YYYY 00:00:00 pm
'/customer/servlet/servlet.FileDownload?file=00P6000000em1MlEAI
My problem comes from the fact that the ESRI software is aware of what that value contains. For example if I enter into the field the value:
01/07/2014 8:58:36 AM - the Esri Software will show that value as entered, which is expected.
However if I enter 01/07/2014 and enter no time, the database will add the default value 00:00:00 to the date. Arc is smart enough to not display this to the user, it just shows the date.
My problem is when I add that service to GeoCortex, I get the time of 12:00:00 AM as a default value showing. Even if there is no time entered in the field.
Is there any way to control the display in my GeoCortex info box to limit the time from showing?
/customer/servlet/servlet.FileDownload?file=00P6000000em1IHEAY
In ArcMap the same feature shows as:
/customer/servlet/servlet.FileDownload?file=00P6000000elzJ4EAI
I tried to play with the HTML settings and only display the left 10 characters but had no luck.
I hope this is clear, I can provide more detail if it would help.
-
As a workaround, we built a database view that outputs only the date. The SQL is along the lines of:
CONVERT(date, licence.ISSUED_DATE, 112) AS issued_date
Some info on the 112 here: http://www.w3schools.com/sql/func_convert.asp
Hope that helps!
0 -
Dates are displaying with a time that is related to your time zone. We are in the central time zone in usa which is -5 GMT right now (we have daylight savings time so it changes in the summer). A date in the database as 2/3/2016 will display at 2/2/2016, 7:00:00 PM. The workaround would be to convert the date to text in a view but then you won't be able to search for items based on a date range. 0 -
Hi Jon
Did you ever get a resolution for this?
Cheers
Chris0 -
Hello,
we have the same problem. Geocortex adds 12:00:00 AM to all our date fields. We don't have the option to create a database view as suggested by another user. We would like to know if there is any way we can set this within Geocortex Manager.
Thank you0 -
It is possible to control the formatting of date fields with Geocortex Essentials 4.5 and the Html5 Viewer 2.6 which are currently in beta.
--Ryan0 -
Ryan,
Do you have any suggestions on how to format date fields now that 4.5 and 2.6 have been released?
Thanks!0 -
Any updates on this? I am still struggling to remove the 12:00:00 from my map tips... 0 -
Hi Lisa,
You can edit your display settings for your date field from the Map Service configuration in manager (In the display settings tab). Look at the bottom section for the Date Format dropdown.
I hope that helps!
Thanks,
Danny0
Please sign in to leave a comment.
Comments
8 comments