Date formatting used with identify results

1315
2
08-08-2013 09:17 AM
by Anonymous User
Not applicable
Hi all,

I have a map service that is currently setup on two different ArcGIS 10.1 SP1 Server machines.  The map contains layers that have editor tracking fields including created_date and last_edited_date fields.  When an identify is performed on the map service all of the attributes get formatted and/or replaced with coded value domains (is there a way for Identify tasks to return unformatted attributes?).  In the case of the date fields, we get values the following from the first machine:

created_date: "4/16/2013 5:58:54 PM"


You can deduce from that value that the date is being formatted as MM/dd/yyyy.  As far as I can tell, that is the default format (from looking at various discussions elsewhere).

However...on the second machine, this date comes back like so:

created_date: "16/04/2013 5:58:54 PM"


In that case, the date format is now arranged as 'dd/MM/yyyy'.

This is problematic, both for display, and for parsing the date string for other purposes in an application.  Is there a way to control the date format that is used by the service in ArcGIS Server?  If not, is there any other way for the application using the service to determine what format is being used?

So far, I haven't been able to identify where along the line this gets set.  I've tried changing the Windows/OS Locale configuration. I don't see anything that affects this when publishing the service from ArcMap.  There don't seem to be any obvious settings I can configure in ArcGIS Server (I have looked through the Manager web interface and the Admin REST API).  There also don't seem to be parameters that can be submitted by the application to the MapService Identify task.

Can anyone suggest what I'm missing?
Tags (2)
0 Kudos
2 Replies
JasonGreenlaw
Occasional Contributor
I've run into the same problem - so far I haven't found a way to modify date formatting at all.

I've also found that a timestamp valid at midnight is returned in an identify request as just the date, with no time information.

Example:  October 28, 2013 at 00:00   is returned as just "10/28/2013"

This really should be able to be customized on a per-field/per-service basis, although I would be happy if we could at least modify ArcGIS Server's default formatting.
0 Kudos
PetrKrebs
New Contributor
FYI, you need to change the locale for the user under which the ArcGIS server container processes are run. Worked for me at 10.0, not sure if the same would apply for later versions.
0 Kudos