list($s1,$s2,$s3)=explode("-",$EndDate);
It is showing:-
Undefined offset: 2 in C:\xampp\htdocs\finishingbrands_new\include\checkReportDates.php on line 3
list($s1,$s2,$s3)=explode("-",$EndDate);
It is showing:-
Undefined offset: 2 in C:\xampp\htdocs\finishingbrands_new\include\checkReportDates.php on line 3
 
    
     
    
    There are three parameters in the list($s1, $s2, $s3), but the $EndDate could be exploded into two array. So the first index of the exploded array will be assigned to $s1. Similarly, the second will be assigned to $s2, and the third will be assigned to $s2. As there is no index of 2, php certainly raise a notice: Undefined offset: 2.
 
    
    You obviously have incorrect data in $EndDate.
The code runs without problems with 2016-06-03
https://3v4l.org/BIJai 
But if we remove one part of the date we get the error you say.
2017-06 returns error.
https://3v4l.org/AmbKP
