Skip to main content
Typos. Tag for the language used for the Q (and answer) code.
Source Link

Timestamp How to convert a (javascript) date to the API timestamp format in stackexchange api 2.1?

When I am using this console page for Stackexchangethis page for the Stack Exchange API search/search path, I can see that it is generating a time-stampstamps in this format:

/2.1/search----fromdate=1380326400&todate=1380412800-------site=stackoverflow

fromdate=1380326400&todate=1380412800

What is this date format  ? how toHow do I convert, to this time stamp, from

var date = new Date().getTime();

??

I got the soecificationspecification from this docthis doc , but I didn't get any method to convert  , it is not just eliminating the millisecond values by dividing withby 1000.

Timestamp format in stackexchange api 2.1

When I am using this console page for Stackexchange API search, I can see it is generating a time-stamp in this format

/2.1/search----fromdate=1380326400&todate=1380412800-------site=stackoverflow

What is this date format  ? how to convert to this time stamp from

var date = new Date().getTime();

I got the soecification from this doc , but I didn't get any method to convert  , it is not just eliminating the millisecond values by dividing with 1000

How to convert a (javascript) date to the API timestamp format?

When I am using this page for the Stack Exchange API /search path, I can see that it is generating time-stamps in this format:

fromdate=1380326400&todate=1380412800

What is this date format? How do I convert, to this time stamp, from

var date = new Date().getTime();

??

I got the specification from this doc , but I didn't get any method to convert, it is not just eliminating the millisecond values by dividing by 1000.

Source Link

Timestamp format in stackexchange api 2.1

When I am using this console page for Stackexchange API search, I can see it is generating a time-stamp in this format

/2.1/search----fromdate=1380326400&todate=1380412800-------site=stackoverflow

What is this date format ? how to convert to this time stamp from

var date = new Date().getTime();

I got the soecification from this doc , but I didn't get any method to convert , it is not just eliminating the millisecond values by dividing with 1000