Select to view content in your preferred language

ArcGIS Featureservice layer and Dates

727
1
10-05-2011 04:43 PM
ZahidChaudhry
Deactivated User
I am trying to add data to ArcSDE (10.01 installed on MS SQL 2008R2) using arcgis server feature service layer. I am not using ESRI's APIs. I tried to add dates but its not working...Date in sql is of field type "datetime2(7)" which i can not change to other fields.. It only take numbers like "03102012" but in database it changes to a strange date....

any help in this regard...
0 Kudos
1 Reply
RobChouinard
Frequent Contributor
I believe this field type requires a timestamp similar to the unix timestamp. So 03102012 would be a very early date. 03102012 = 2/5/1970 9:40:12 PM UTC. So 10/10/2011 12:00:00 AM UTC would be: 1318204800.

Read Here:
http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/feature.html

"Note that date values are encoded as numbers. The number represents the number of milliseconds since epoch (January 1, 1970) in UTC."


Which Unix timestamp is the number of seconds since epoch. Seems you can use the Unix timestamp if you only need to the second accuracy.

What programming language are you using?
0 Kudos