Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to use Add Features REST service to add a new record to a table in an ArcSDE geodatabase.

One of the field is type of esriFieldTypeDate, but I don't know how to populate this field in JSON script. An example is as follows:

[
    {
      "attributes" : {
        "LOCATION_ID" : 30,
        "LOCATION_NAME" : "SDAF",
        "LOCATION_STATUS" : "IN USE",
        "GEOMETRY_ID" : 30,
        "CREATE_DATE" : "2008/06/16 00:00:00 AM"
      }
    }
]

Column "CREATE_DATE" is of esriFieldTypeDate type. But the above JSON ended up with an error.

share|improve this question
    
What does the json returned for a Query look like for CREATE_DATE? –  Kirk Kuykendall Apr 12 '12 at 3:04
    
Just hit the same wall. Here's what a Date field looks like as returned in JSON from our server: ReviewedDate: 1384300800000 Looks like millis since 1/1/1970 as noted in the answer below –  Ryan Twilley Nov 26 '13 at 18:19
add comment

1 Answer 1

attributes: The feature attributes. It is a JSON object that contains a dictionary of name-value pairs. The names are the feature field names. The values are the field values and they can be any of the standard JSON types - string, number and boolean. Note that date values are encoded as numbers. The number represents the number of milliseconds since epoch (January 1, 1970) in UTC.

That is what the Esri REST endpoint help says.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.