« first day (1 day earlier)  last day (14 days later) » 

9:31 AM
Please post real code, not pictures of code. Why have you posted (a picture of) so many lines of commented out code? Which line of code generates the exception?
I have tried to advise you on how to start solving the problem but you are not providing any useful answers to my questions about what you have done or have tried.
 
 
3 hours later…
12:45 PM
ho sorry, i edit my code, please go through it
 

« first day (1 day earlier)  last day (14 days later) »