Hi guys,

I've got an url that I pull data from - it has the date as follows:

"startDateText=2015-02-01&endDateText=2015-03-31"

it then auto-redirects to an url I capture, which I'll use to pull my data from.
In this URL, the date is written as:
"startDate=1422774000&endDate=1427785200"

Now the difference between these is 5011200, which translates into 58 days in seconds (1 day in seconds = 24 * 3600 = 86400; 5011200 / 86400 = 58).
This is the number of days between these two dates.
However, I want to be flexible with my dates.

So question is - how can I write *any* date in seconds as a full integer?
example : 2015-02-01 --> 1422774000
example : 2015-03-31 --> 1427785200

What calculation to do if I'd want the number for start-date 2014-12-14 or 2013-05-28 etc

Thanks!

Jasper