AnsweredAssumed Answered

Default values for dates

Question asked by ren_rosin on May 6, 2020
Latest reply on May 6, 2020 by ren_rosin

Mike Minami  have been following the thread about default values in ArcGIS online, and would like set the default value of a date field in a feature service. It currently defaults to 12/29/1899. When I go to the fields tab in Arcgis Online, for the default value, it says "Invalid Date" and doesn't allow me to edit it. Can I edit it in json?

What should the json look like for "Today's Date"

This is what it currently looks like:

 {       "name" : "Date_new",        "type" : "esriFieldTypeDate",       "alias" : "DATE_New",        "sqlType" : "sqlTypeOther",        "length" : 8,        "nullable" : true,        "editable" : true,        "domain" : null,        "defaultValue" : "-2209161600000",        "description" : "{\"value\":\"\",\"fieldValueType\":\"dateAndTime\"}"     }


Outcomes