Select to view content in your preferred language

Passing date to featureservice...

682
2
10-06-2011 01:29 PM
ZahidChaudhry
Deactivated User
I am editing feature service and everything works fine except Dates. Can not populate correct dates. I am using ArcSDE (10 and SQL server 2008R2 and data is stored as DATETIME2(7)).
I just need to know that how can i get.. "1199145600000" for "1 Jan 2008 00:00:00 GMT" because if i use "1199145600000" i get the right date populated.
Also i can only pass numbers no strings..if i try to pass something like "10/2/2011"..it just failed...
[HTML]
Syntax: time=<timeInstant>
Example: time=1199145600000 (1 Jan 2008 00:00:00 GMT) [/HTML]

here is the URL from where i got this example.

http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/fsquery.html
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Zahid,

  Try this:

var bDate1:Date = new Date(2011,10,2,0,0,01);
//When you pass the date use bDate1.time;
//Notice the 01 for the seconds that will take care of the REST date time issue.
0 Kudos
ZahidChaudhry
Deactivated User
Zahid,

  Try this:

var bDate1:Date = new Date(2011,10,2,0,0,01);
//When you pass the date use bDate1.time;
//Notice the 01 for the seconds that will take care of the REST date time issue.


Thanks Robert,
I forgot to mention that i am not using ESRI API. But i will try this in the morning. All i want is Date i am not worried about time... (2011,10,2)...will try in the morning and see if it works...
Thanks again
0 Kudos