I'm looking to extract valuable data from a JSON obtained from web services that doesn't contain the required information. The JSON output resembles the following:
[ {
"Val1": "Value One",
"Status": "Okay",
"endDate": "2017-09-30T00:00:00"
},
{
"Val2": "Value Two",
"Status": "Okay",
"endDate": "2017-08-24T00:00:00"
} ]
Is there a method to calculate the difference in days between the current date (which is dynamic) and the endDate, then increment a counter by that calculated value?
This would be applied as follows:
- End date within 10 days: #
- End date within 20 days: #
and so forth.
Thank you in advance for any assistance provided.