danyim

Turning an esriFieldTypeDate field (an integer) into a string

Discussion created by danyim on Jan 27, 2011
Latest reply on Sep 14, 2011 by drewdowling
For my web application, I have a FeatureSet that returns the attribute table of a feature layer, and in that table, there is a date field (esriFieldTypeDate) that I must print. However, when I try that, I get an 11- to 12-digit integer instead of the typical MM/DD/YYYY date string.

The strange thing is, when I use the Query Related Records tool from the ArcGIS Services page, it actually parses the date field correctly... but the source of that page doesn't give any clues as to how it did.

So, for instance, I get the following:

51494400000 instead of 1971/08/20 00:00:00 UTC
50889600000 instead of 1971/08/13 00:00:00 UTC
779328000000 instead of 1994/09/12 00:00:00 UTC

Is there a pattern I'm not seeing? Is there a special way to parse these integer dates?

Thanks

Outcomes